MIME stands for Multi-purpose Internet Mail Extensions. Though, the use of the word MIME has evolved to encompass data transactions outside the realm of web mail. Back in the day, MIME types simply defined content delivered between mailing servers and clients (Outlook) for 1-on-1 communication. But now they are used by clients like browsers (Chrome) to interpret global communication.
MIME types are also called media types and content types.
A Simple Explanation of MIME Types
Using the last example: The MIME value of
application and the “subtype” is
Why We’re Talking About MIME Types
In November 2015, MaxCDN’s Justin Dorfman and his partner Josh Mervine ran into a dilemma when rewriting
Although the IETF only considers
A Technical Explanation of MIME Types
Most operating systems like Microsoft Windows, Mac OS X, or the various Linux distributions identify file types through file name extensions - usually the three characters following the dot ending a file name (example: .doc). Likewise, an operating system associates applications that should read and edit certain file types. For example, in Microsoft Windows we typically would see Microsoft Word opening a file ending with the .doc extension (
application/msword), and an image viewer would open a file with the .jpeg extension (
By default, Microsoft Windows hides file name extensions from the user's view for convenience. They can be enabled by following instructions in this how-to by Microsoft.
The equivalence of “filename extensions” on the Internet is provided by MIME types. They tell web browsers and email clients what type of files they are dealing with so the application knows how to process the file. Just the way operating systems associate default programs and actions to file name extensions, applications on the Internet make use of the MIME types. MIME types are defined in two parts, having a “type” and a “sub-type” as described in the first section of this article. If you look at the HTTP header of a PNG image, you’ll see the MIME type defined in the
Content-Type field. Here is the HTTP header of an image file from the MaxCDN Blog:
HTTP/1.1 200 OK Date: Sun, 10 Jan 2016 12:56:04 GMT Content-Type: image/png Content-Length: 2075
The MIME type is
image/png. That tells the browser the resource is of type "image" and sub-type “png”, which we usually refer to as the image format. The browser can then decide on how to display the image, whether it can display or does not have the required technology to display such type of image. This is more common with audio and video types. The ability to categorize resources in types and sub-types gives applications a unique advantage to provision when displaying web content. For example, if a browser receives a file from a web server of type
audio/xyz, it might not have the required plugin to play. But because the browser at least understands it is an audio file, it can prompt the user accordingly. The
Content-Type field may carry additional information called “arguments” and there may be several arguments for the MIME type. One example of an argument is the character-set information for the
text/html type. Here is a part of the HTTP header from the MaxCDN Blog showing the
HTTP/1.1 200 OK Date: Sun, 10 Jan 2016 13:07:47 GMT Content-Type: text/html; charset=UTF-8
Content-Type field accepts several arguments and their order is not important. In the above header extract, the argument is “charset=UTF-8”. The browser thus interprets the resource as text of sub-type
html and the character set required is
UTF-8. There is an official list of MIME Types published by the Internet Assigned Names and Numbers Association (IANA), which is regularly updated. The list contains MIME types that have been reviewed by the association.
Experimental MIME Types
MIME Type Resources
Technical standards by the IETF have lengthily described the MIME format. I recommend that Internet geeks be familiar with the following RFCs:
- RFC 2045 – MIME, Format of Internet Message Bodies
- RFC 2046 – MIME, Media Types
- RFC 2047 – MIME, Message Header Extensions for Non-ASCII Text
- RFC 4289 – MIME, Registration Procedures
- RFC 2049 – MIME, Conformance Criteria and Examples
And here are some MIME types lists:
As always, If you have any questions or concerns about any of the topics mentioned in this article, please feel free to reach out to support. Live chat and ticket support are available 24/7.