MIME Types and Venkman

How do Mozilla get the MIME type of a uri?
For HTTP URIs, as well as for Mail Attachments, Mozilla usually gets a mime type sent from the server, and uses it. Contrary to IE, Mozilla will not sniff the type of the document, not even for application/octet-stream or text/plain documents. There is one exception: for images loaded via <img src>, Mozilla's image library will do content sniffing (never extension sniffing) to find out the real type of the image.

Read the article How Mozilla determines MIME Types

Debugging JavaScript
If you've ever written some JavaScript, and had a bug in it, and gone to great lengths of finding out why it didn't work, you've probably used some of the traditional debugging "tools" that have been available to JavaScript programmers. An unholy mix of alert boxes or maybe document.write plus judiciously inserted debugging code, and tons of out commented code.

Read Learning the JavaScript debugger Venkman


August 29, 2003 07:44 AM | Posted in Mozilla

Ads:

Back Next

4 Comments

Actually, it also sniffs stylesheets. Ever notice those stylesheet sent at text/plain loaded as text/css in the JavaScript console?

Comment by Brant Langer Gurganus at August 29, 2003 03:52 PM | Permalink

Unfortunately, a lot of people complain about files arriving as text/plain when they shouldn't be. And since Mozilla/Firebird doesn't correct it at all, an extension is needed. From what I've seen, the proper hooks don't exist to intercept well.

Site icon Comment by alanjstr at August 29, 2003 04:50 PM | Permalink

I use ForceContentType which can do just that
Force all documents ending with .avi to be "video/avi"

Check it out:
http://forcecontenttype.mozdev.org

Site icon Comment by Henrik Gemal at August 29, 2003 05:19 PM | Permalink

For HTTP URIs, as well as for Mail Attachments, Mozilla usually gets a mime type sent from the server, and...

Site icon TrackBack from How Mozilla determines MIME Types at September 2, 2003 01:11 AM | Permalink

Post a comment




Remember Me?




Please enter the security code you see here

.
You're here: Home - MIME Types and Venkman
Get the Mozilla Firefox browser