You are here: Re: Save As Q « HTML « IT news, forums, messages
Re: Save As Q

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация