MIME

Definition: Multipurpose Internet Mail Extensions is the fundamental Internet standard for sending multimedia e-mail (contain, for example, audio, video and/or graphics) and messages in non ASCII character sets. Also used by Web browsers, MIME specifies what types of media a message contains and the form in which it has been encoded.

We take for granted the easy exchange of electronic documents via e-mail. Just click on "Insert Attachment", specify which file, and the job's done. But before 1992, there was no standard way to do this. Back then, if you wanted to send a copy of a document (say, a contract that had been prepared using a word processor, a spreadsheet of financial information or a diagram), your options were quite limited:

  • You could print it out and then mail, fax or deliver a hard copy to the recipient. This let the reader see the final form, but to make changes or add comments, he had to write them by hand and then send the whole package back to you so you could input the changes.
  • You could save the document on a floppy disk and then either hand it to the recipient or ship it. This got him the document in digital format, available for editing and revision, and it preserved the original's graphics and formatting. But it was time-consuming and expensive.
  • You could send the document as an e-mail message. You'd first have to convert the document to plain ASCII (seven-bit) text. That way, the addressee received it in digital form, but all graphics and formatting were lost. The recipient could make changes on the digital copy and send it back to you, but you'd have to do a character-by-character or line-by-line comparison just to find the changes. You'd then transfer them to the original document (perhaps by cutting and pasting) and determine what formatting to apply to each change. That might be more work than dealing with an old-fashioned hard copy.

All bets were off if the document in question included graphics, sound files or video clips or was written in Japanese or Russian, neither of which uses the Latin alphabeton which ASCII is based. Clearly, users needed more capable e-mail.

We got that better e-mail with the advent of Multipurpose Internet Mail Extensions. This standard took hold so quickly that today MIME compatibility is simply assumed to exist within every e-mail program and Web browser. MIME offers these features:

  • on-ASCII support

    For electronic communications, letters of the Roman alphabet are encoded into numbers according to the ASCII-coded character set. However, for billions of users whose native language is not English and who do not use the unaccented Latin alphabet, ASCII is unusable. MIME allows other alphabets to be used via defined character sets. For example, the ISO 8859-1 standard extends the basic ASCII character set to include accented characters used in French, Spanish and German; ISO 8859-8 is for Hebrew; and BIG5 is widely used in Taiwan, where it has become a de facto standard.

  • Content type labelling

    To identify the type of content in a file, most operating systems use a short filename extension. MIME provides a better, more specific indicator, the MIME type, which includes a primary type, a slash and a subtype. The primary type is quite general; examples include text, audio, video, image and application. The subtype provides the information a computer program needs to properly handle the content. For example, image subtypes include JPEG, GIF, PNG, TIFF and others. A complete MIME type example is "image/GIF", where "image" is the primary type and "GIF" is the subtype.

    MIME types are important to the smooth running of the Internet. When a Web server sends content (which might be HTML text, JPEG or GIF images, or a PDF file) to a Web browser, it also includes a MIME-type descriptor. This is how the browser knows when to display HTML text and images, or when to start Acrobat Reader for a PDF file.

  • Support for nontext content

    Today's Internet mail system is still limited by the legacy of its forebears and can only reliably carry messages that are entirely ASCII text. Before nontext content, such as an image or a sound, is sent through the e-mail system, it is usually encoded into text characters using a system called Base64. MIME also provides an alternative called "quoted-printable" that is suitable for character sets that are mostly ASCII-compatible. If you ever see the characters "=20" or just "=" at seemingly random places in the text of a message -- especially one that has been forwarded numerous times -- those probably are attributable to text that was incorrectly decoded from the quoted-printable encoding.

  • Support for multipart, compound documents

    When you send an e-mail with an attachment, your e-mail program creates a two-part message. The first part contains the text of your message, and the second part, the attached file (Base64-encoded). MIME specifies how these two parts combine to form a single message. A message may have any number of parts, and each one can contain multiple parts.

    MIME has been adapted as a compound document technology for Web pages. Most Web pages consist of an HTML file, a set of image files, and perhaps some audio and video files. To view such a page off-line, you must save all those files. Many browsers give you the option of saving just the HTML file, saving the HTML file and all image files to a directory, or saving it all as a single file. Pick the last option, and your browser will save the HTML and image files as a single multipart MIME document with an .mht extension. If you view this compound document with a text editor, you'll see the multiple parts separated by boundary lines and images encoded with Base64.

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

More about ADVENTIANAIETFInternet Engineering Task ForceISOVIA

Show Comments
[]