Ralph Shnelvar wrote in post #970593:
> I have the following HAML code ...
>
> %ul
> %li{'class' => list_item_L3}
> %div{'id' => getting_started_div}
> %span{'id' => getting_started_span}
> %a{'id' => getting_started_a,
> 'href' => '/videos/msg_ralph2.shnelvar.wmv}
> Shnelvar
>
> The link displays correctly but IE8 and FireFox both attempt to play the
> file instead of putting up a prompt to download the wmv.
>
> How can I force a download rather than a play?
There are things you can do with HTTP headers. BUT PLEASE DON'T. In
most browsers, it is easy to download a document that is displayed in
the browser, but it is impossible to display in the browser a document
that is automatically downloaded.
By automatically downloading, you are depriving the user of the choice
of what he wants to do with that file. (You might want him to download
it, but he might prefer to take a quick listen in the browser before he
does so.). That's a UI mistake. Again, don't do it.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
Sent from my iPhone
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment