Post by lduperval » June 1st, 2004, 8:13 am
I'm using the Linky extension and I think it's great. There's just one thing that annoys me. Even if I provide the correct filename extension, it the MIME type is set to application/octet-stream, Firefox won't let you download it automatically. You always have to go through the file save dialog. Even the button to "Always do this for this type of file" doesn't work.
Is it possible to tell Firefox 0.8 (Linux) to always save an application file? If not, can I tell linky to bypass the File Save dialog?
David H Posts: 2254 Joined: June 13th, 2003, 5:17 am Location: JapanPost by David H » June 2nd, 2004, 4:26 am
Without the proper mime-type sent from the server, there's no way for FF to know for sure whether it's a binary or a text file. The extension is immaterial; since any extension can be added to any type of file, it's untrustworthy as an indicator of file-type. FF just ignores it. FF is being told that the file is a generic application binary (at least it's better than being sent as text ), so it will always handle it in that manner. There's no way around it in the browser itself, AFAIK.
It is possible to use a third-party application to sniff out the extension name and change the mime-type before it reaches the browser. There was once an extension that would do it, but I'm not sure what's become of it now. A better way is to use a proxy filter like Proxomitron or Privoxy to change it. (Google for them. Both are exceptionally useful programs for filtering your web content in other ways as well.)
Edit: Oh, I just noticed you're on Linux. Proxomitron is Windows only. It does however work pretty well under Wine if you have the proper native .dll's for it. Privoxy will run on Linux.