HFS: MIME Types: Difference between revisions

From rejetto wiki
Jump to navigation Jump to search
Line 5: Line 5:
== Is not the file extension enough? ==
== Is not the file extension enough? ==


bbb
Sometimes file extension is not enough. E.g. In the web enviroment, when a PHP script generates a jpeg image, you get an URL with a ''.php'' extension, but the browser will know the content represents a jpeg image because it gets this information in the http header as a ''MIME type''.

Revision as of 19:10, 17 April 2006

What is a MIME type?

A MIME type is an information describing the kind of document that has been retrieved from the web server. Since a web server can furnish many types of documents, the browser needs a way to know what's the document nature.

Is not the file extension enough?

Sometimes file extension is not enough. E.g. In the web enviroment, when a PHP script generates a jpeg image, you get an URL with a .php extension, but the browser will know the content represents a jpeg image because it gets this information in the http header as a MIME type.