|
Posted by Mitja on 06/07/05 19:28
On Tue, 07 Jun 2005 18:08:00 +0200, Captain Dondo <yan@NsOeSiPnAeMr.com>
wrote:
> What I would like is to prevent the browser (any browser, I know I have
> to support IE, FireFox, and Mac-Safari at a minimum) from opening this
> jpeg image in a new window, and instead ask the user if s/he wants to
> save the file.... Doable? I guess what I am trying to do is turn off
> the automatic mime-type handling for this one operation.....
>
> Failing that, I am looking for the most elegant way of handling this. I
> really don't want users to get a window that is 2 or 3 times their
> screen size, just to save the file.....
"Failing this" meaning you already failed or not? If you have, try again
:) - that's just about the only way of suggesting to the user's browser to
save the file rather than open it. And even then... I'm not sure about IE,
you'd have to try that. As for the others, I think they'll honor
content-type: application/octet-stream.
JS can't help you there, I'm 99% sure of it. Neither can anything else,
AFAIK - this is a FAQ and the common answer is simply "it can't be done".
And it certainly cannot be _forced_, but with an altered content-type, you
may come close.
Otherwise (i.e. if IE fails to cooperate) your best bet is to ask visitors
to right click the link and select "save target as" - not an uncommon
practice.
[Back to original message]
|