MIME Types

Multipurpose Internet Mail Extensions

MIME types are used by web servers and web browsers. Each will contain a file that has a table of MIME types with the associated file extension for that type.

MIME type file on Apache

text/html  	html htm HTML 
text/plain 	txt
image/gif	gif
image/jpeg	jpg jpeg
...

MIME types are universal

It is the MIME type that is universal, not the extension. All systems have agreed to use MIME types to identify the content of a file transmitted over the web. File extensions are too limiting for this purpose. Many different word processor programs might use the extension .doc to identify a file. For instance, .doc might refer to a MS WORD document or to a MS WORDPAD document. It is impossible to tell from the extension which program actually created the program. In addition, other programs could use the .doc extension to identify a program: for instance, Word Perfect could also use the .doc extension. Using the extension would be too confusing to identify the content of the file.

By using a mime type, more information can be conveiged than in an extension. There are two parts to a MIME type: the general category, and the specific type. There can be several specific types in a category: image/gif, image/jpeg, image/png.

When a file is sent over the internet, it's content is identified by a content type.

Examples of using MIME types

Click on these links to see the message you get for these files:

For more MIME information, check this link: http://www.oac.uci.edu/indiv/ehood/MIME/MIME.html

For a list of mime types, check this link: ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types