Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Feedback > Content types and Firefox
2010-03-25 22:01
MagerValp

Registered: Dec 2001
Posts: 1082
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?
2010-03-25 22:34
Perff
Administrator

Posts: 1686
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? :) )
2010-03-25 22:59
chatGPZ

Registered: Dec 2001
Posts: 11523
i can view/open files directly fine, in firefox and in opera... what am i doing wrong? =P
2010-03-26 07:57
Jetboy

Registered: Jul 2006
Posts: 363
Works for me too.
MagerValp maybe you have something messed up with file associations on your system?

------
http://colors.collectingsmiles.com
2010-03-26 11:08
Skate

Registered: Jul 2003
Posts: 506
@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);
2010-03-26 12:09
chatGPZ

Registered: Dec 2001
Posts: 11523
and btw, the proper content type for d64 _is_ "application/octet-stream" =)
2010-03-26 12:58
Burglar

Registered: Dec 2004
Posts: 1137
Quoting Groepaz
and 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
2010-03-26 13:06
chatGPZ

Registered: Dec 2001
Posts: 11523
defining content types that the OS (or the browser) doesnt know about is really pointless though.
2010-03-26 13:15
Burglar

Registered: Dec 2004
Posts: 1137
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"
2010-03-26 13:18
Burglar

Registered: Dec 2004
Posts: 1137
http://filext.com/file-extension/D64
2010-03-26 13:23
chatGPZ

Registered: Dec 2001
Posts: 11523
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Sledge/Fairlight
Durandal
ΛΛdZ
Scorpion/Contex / Ar..
REBEL 1/HF
megasoftargentina
Pac
Guests online: 177
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Diskmag Editors
1 Magic  (10)
2 Jazzcat  (9.5)
3 hedning  (9.2)
4 Elwix  (9.1)
5 Peter  (9.0)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.052 sec.