| |
MagerValp
Registered: Dec 2001 Posts: 1065 |
Content types and Firefox
Firefox recently got stricter about Content-Type:s, so it's no longer to automatically launch x64 or The Unarchiver from downloads on CSDB. Everything is sent out as application/octet-stream, and saving is the only option. Is there any chance we could get proper Content-Type:s for zip files, d64s, etc?
|
|
| |
Perff Administrator
Posts: 1673 |
Hm. Might be something to spend some time on.
But it must be done right, and tested in several browsers as there have been some issues with this before.
Anyone with some experience on this field? Also how to detect the correct content-type in php. (I bet there is a better way than checking the filename? :) ) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11293 |
i can view/open files directly fine, in firefox and in opera... what am i doing wrong? =P |
| |
Jetboy
Registered: Jul 2006 Posts: 269 |
Works for me too.
MagerValp maybe you have something messed up with file associations on your system?
------
http://colors.collectingsmiles.com |
| |
Skate
Registered: Jul 2003 Posts: 494 |
@perff: as of php v5.3.0, Fileinfo function comes built-in. Try the code below.
$filename = "path/filename.extension";
$finfo = finfo_open(FILEINFO_MIME_TYPE);
echo finfo_file($finfo, $filename);
finfo_close($finfo);
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11293 |
and btw, the proper content type for d64 _is_ "application/octet-stream" =) |
| |
Burglar
Registered: Dec 2004 Posts: 1069 |
Quoting Groepazand btw, the proper content type for d64 _is_ "application/octet-stream" =)
"application/octet-stream" is just the default type of everything binary. as it doesn't define anything, newer browsers will not auto-open it (like firefox).
application/x-d64 will work perfectly fine instead, and application/x-prg too.
and for zip, use application/zip
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11293 |
defining content types that the OS (or the browser) doesnt know about is really pointless though. |
| |
Burglar
Registered: Dec 2004 Posts: 1069 |
which is why you tell your browser to use x64 to open those types.
really, using application/octet-stream is telling the browser "you can not render this, just save the thing on disk" |
| |
Burglar
Registered: Dec 2004 Posts: 1069 |
http://filext.com/file-extension/D64 |
| |
chatGPZ
Registered: Dec 2001 Posts: 11293 |
Quote:which is why you tell your browser to use x64 to open those types.
thats pretty much what i did ... unless people start using whatever fucked up file extension, where is the problem? :) |
... 10 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |