College of Engineering Logo Web Server Logs Student Server Logs Orange bar Main Page General Information Special Events Programs Research Student Information Computer Facility Outreach Xtreme Engineering Jobs Available

Multipurpose Internet Mail Extensions

Initially used exclusively for sending multimedia files through electronic mail, MIME has found its way into the World-Wide Web to allow browsers to determine the type and format of files being transferred. For every file transfer through the use of the HyperText Transfer Protocol (HTTP), a "Content-Type" information, telling the browsers what kind of file is being sent by the server.

Most systems do not save information about a file's contents in addition to its contents. One exception is the Apple Macintosh computers, which save application and type data as an integrated part of their file systems. For those systems which do not save content type data, however, the filenames' extensions are typically used to indicate content.

Each Web server on the net maintains a set of filename extensions which correspond to a specific type, and the file for our server is given as an example in the mime.types file.

A MIME type is typically declared with a content-type and a subtype. For example, this document you are reading has a content-type of text, and a subtype of html. This is represented in the header as follows:

Content-type: text/html
A list of some valid type values defined by the MIME standard are given below. The subtype can be followed by a semicolon after which some options may be specified.
  • text - Any form of textual data, including plain text or HTML text.
  • multipart - A document which consists of more than one part. In this case, the "boundary" parameter between messages must be specified, as shown:
    Content-type: multipart/mixed;boundary=thisisaboundary

    --thisisaboundary
    Content-type: text/plain

    Part one of this document
    --thisisaboundary
    Content-type: text/plain

    Part two of this document
    --thisisaboundary--
    In this example, the boundary is the string, thisisaboundary, and for each new part, two hyphens precede the boundary, and at the end, two hyphens both precede and follow the boundary string. Each section of the file contains a Content-type header, followed by a blank line.
  • application - A document type for a specific application. This type is typically binary data used by applications.
  • message
  • image - The type for graphical images. Typical subtypes are gif and jpeg.
  • audio - The type for audio files. One typical subtype is basic.
  • video - The type used for video files. Typical subtypes are mpeg and quicktime.
Experimental subtypes are given by preceding the subtype name with x-. For example, the format for Video for Windows is given as follows: video/x-msvideo.

Author: Ben Yoshino (ben@wiliki.eng.hawaii.edu)

Comments, Questions? | E-mail: webmaster@wiliki.eng.hawaii.edu


Last updated on Monday, February 05, 2001
Copyright © 2001 University of Hawai`i, College of Engineering, Computer Facility
All rights reserved.