On Thursday 13 March 2008, Suha Onay wrote: > I run this page from Firefox, IE and IE Mobile. > I want the browser open a save as dialog but it shows the file within the > browser. > How can I achieve this?
You can set the following HTTP header:
Content-Disposition: attachment; filename
Where "filename" is the suggested name for saving the file.
Note that HTTP headers must be ASCII. It is possible to encode Unicode in
HTTP headers, but it's a real pain to get it working in all browsers. At
least, I haven't been able to find a single way of encoding that works for
IE, Mozilla and Opera, so now I choose a different way of encoding
depending on the user agent header.
Bye,
Maarten
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Twisted-web mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
