MIME Introduction and Resources: Multimedia and More

MIME stands for "Multipurpose Internet Mail Extensions." It's the Internet standard used to identify various file types transmitted online. Originally, it was developed for email that was sent over SMTP (Simple Mail Transfer Protocol) which is the Internet standard for email transmission. Nowadays, MIME is being used in other communication protocols such as HTTP.

MIME History

Back in the day, the standard format for text messages was purely based on text which was encoded in ASCII standard based on the English alphabet. ASCII codes represent text in computers and other devices. This standard had been in use since 1982 and it was originally developed for use in ARPA Internet Text Message. It worked great for the time it was developed, since most messages were simple and short, consisting of nothing but text.

With time, our messages started to get more complex and it became obvious that this standard format was not enough. Multimedia images that contained audio or video files weren't defined at all. The same applied for languages that didn't use the English alphabet. The situation finally began to change when two people joined forces: Nathaniel Borenstein and Ned Freed.

Their proposal redefined the format of messages to allow for email to contain multiple objects in a single message; the use of non-ASCII characters as well as non-English languages; and the use of images, audio, and video. This was the birth of MIME which became the official standard in 1993.

The proposal also defined the encoding standards which are 7bit, 8bit, base64, binary, and quoted-printable. Those encoding standards were supposed to ensure all data is indeed being sent. It also included information on the use of Content-Type header which is necessary to properly identify the type of data that is transmitted.

What Are MIME Types?

MIME types are identifiers used to identify the many file formats being transmitted every day on the Internet. They are standardized by the IANA (Internet Assigned Numbers Authority). MIME Types were first defined and named as such in Request for Comments: 2045 (RFC 2045) published by the IETF (Internet Engineering Task Force) which was the official proposal submitted by Borenstein and Freed.

Structure

MIME types consist of a type and a subtype which are two strings separated by a forward slash. Type represents a category and can be discrete or multipart. Each type has a specific subtype. Traditionally, MIME types are written in lowercase.

Discrete types include text, image, audio, video, and application. Multipart types represent a category of documents which are broken down into distinct parts and often include different MIME types. They include form data and byteranges.

Some MIME types are prefixed by either x or vnd. The x prefix means it hasn't been registered with the IANA and vnd signifies vendor specific prefix.

Common MIME Types

Application:

  • application/msword (.doc)
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document (.docx)
  • application/vnd.openxmlformats-officedocument.wordprocessingml.template (.dotx)
  • application/vnd.ms-powerpoint (.ppt)
  • application/ecmascript (.es)
  • application/x-javascript (.js)
  • application/octet-stream (.bin, .exe)
  • application/pdf (.pdf)
  • application/postscript (.ps, .ai, .eps)
  • application/rtf (.rtf)
  • application/x-gtar (.gtar)
  • application/x-gzip (.gz)
  • application/x-java-archive (.jar)
  • application/x-java-serialized-object (.ser)
  • application/x-java-vm (.class)
  • application/x-tar (.tar)
  • application/zip (.zip)
  • application/x-7z-compressed ( .7z)
  • application/x-rar-compressed (.rar)
  • application/x-shockwave-flash ( .swf)
  • application/vnd.android.package-archive (.apk)
  • application/x-bittorrent (.torrent)
  • application/epub+zip (.epub)
  • application/vnd.ms-excel (.xsl)
  • application/x-font-ttf (.tff)
  • application/rss+xml (.rss, .xml)
  • application/vnd.adobe.air-application-installer-package+zip (.air)
  • application/x-debian-package (.deb)
  • application/json (.json)

Audio:

  • audio/x-midi (.mid, .midi)
  • audio/x-wav (.wav)
  • audio/mp4 (.mp4a)
  • audio/ogg (.ogg)
  • audio/mpeg ( .mp3)

Image:

  • image/bmp (.bmp)
  • image/gif (.gif)
  • image/jpeg (.jpeg, .jpg, .jpe)
  • image/tiff (.tiff, .tif)
  • image/x-xbitmap (.xbm)
  • image/x-icon (.ico)
  • image/svg+xml (.svg)
  • image/png (.png)

Text:

  • text/html (.htm, .html)
  • text/plain (.txt)
  • text/richtext (.rtf, .rtx)
  • text/css (.css)
  • text/csv (.csv)
  • text/calendar (.ics)

Video:

  • video/mpeg (.mpg, .mpeg, .mpe)
  • video/ogg (.ogv)
  • video/quicktime (.qt, .mov)
  • video/x-msvideo (.avi)
  • video/mp4 (.mp4)
  • video/webm (.webm)

Resources

MIME types allowed us to have a better and richer email experience. The following list of resources will help you learn more in depth about how and why they came to be as well as how to properly configure a web server for MIME type support, and more.

Online Resources

The following list includes links to the five-part proposal that became the standard draft for MIME.

  • RFC 2045 (PDF): the first part of the proposal specifies the various headers used to describe the structure of MIME messages.
  • RFC 2046 (PDF): the second document defines the general structure of the MIME media typing system and the initial set of media types.
  • RFC 2047 (PDF): the third part of the proposal describes extensions which allow non-US-ASCII text data in Internet mail header fields.
  • RFC 2048 (PDF): the fourth part describes how new MIME types can be registered with IANA.
  • RFC 2049 (PDF): the fifth document describes MIME conformance criteria with examples of MIME message formats.
  • Media Types: a complete list of all media types, which also includes a link to the application for registering new media types.
  • The MIME Guys: How Two Internet Gurus Changed Email Forever: an article based on the interviews with Nathaniel Borenstein and Ned Freed which gives an interesting insight into their work.

Tutorials

The following resources provide useful tutorials on handling MIME types, proper server configuration, and more.

Books

Although there aren't any books dedicated solely to MIME types, there is still a decent number of books on closely related topics that dedicate a few chapters to them.

  • Internet Email Protocols, Standards and Implementation (1998) by Lawrence Hughes: aimed at more advanced users, this book strengthens the knowledge of essential concepts needed to develop email software and thoroughly describes the key Internet email protocols and extensions such as SMTP, POP3, IMAP, MIME and DSN.
  • Programming Internet Email (1999) by David Wood: an essential guide that covers all the important concepts necessary to build applications on top of email capabilities. Topics covered include various email protocols, email formats including MIME types, and plenty of examples.
  • Essential Email Standards (1999) by Peter Loshin: this book is a must-have for anyone looking to get an in-depth understanding of email standards. It provides a thorough analysis of the most important RFCs published by IETF as well as their potential use. It also includes a fully searchable digital version of the book on a CD.
  • MH & xmh (2006) by Jerry Peek: this book is freely available online and published under the GNU-GPL license. The third chapter explains in great detail MIME types and multipart messages

Tools

The links below feature a few useful tools for checking the validity of MIME types.

Expand Your Knowledge of MIME Types

MIME types may seem insignificant on the surface but they brought major changes in the way our email messaging works. This list of resources should pique your curiosity and provide you with a deeper understanding of how email and files transmitted over the Internet have transformed through the years.


Further Reading and Resources

We have more guides, tutorials, and infographics related to web use and development:

Ultimate Guide to Web Hosting

All websites have to be hosted them somewhere. Check out our Ultimate Guide to Web Hosting. It will explain everything you need to know in order to make an informed choice.