Media types were originally defined in Request for Comments RFC 2045 (MIME) Part One: Format of Internet Message Bodies (Nov 1996) in November 1996 as a part of the MIME (Multipurpose Internet Mail Extensions) specification, for denoting type of email message content and attachments;[6] hence the original name, MIME type.
Media types are also used by other internet protocols such as HTTP,[7] document file formats such as HTML,[8] and the XDG specifications implemented by Linux desktop environments,[5] for similar purposes.
[3] XDG specifications implemented by Linux desktop environments continue to use the term "MIME type".
A media type can optionally define a suffix and parameters: As an example, an HTML file might be designated text/html; charset=UTF-8.
In this example, text is the type, html is the subtype, and charset=UTF-8 is an optional parameter indicating the character encoding.
As of November 1996, the registered types were: application, audio,image, message, multipart, text and video.
[6] By July 2024, the registered types included the foregoing, plus font, example, model, and haptics.
[9][10][11] In the context of Linux desktop environments, the unofficial top-level types inode (inodes other than normal files, such as filesystem directories, device files or symbolic links),[12] x-content (removable media, such as x-content/image-dcf for DCF digital cameras),[13] package (package manager packages)[14] and x-office (generic categories of office productivity software document)[14] are used.
[15] Registrations in the standards tree must be either associated with IETF specifications approved directly by the IESG, or registered by an IANA recognized standards-related organization.
Industry consortia as well as non-commercial entities can register media types in the vendor tree.
The unregistered tree includes media types intended exclusively for use in private environments and only with the active agreement of the parties exchanging them.
[18] From the IANA registry:[1] Mailcap (derived from the phrase "mail capability") is a type of meta file used to configure how MIME-aware applications such as mail clients and web browsers render files of different MIME-types.
Lines can be comments starting with the # character, or a mime-type followed by how to handle that mime type.
In UNIX-type systems, the mime.types file is usually located at /etc/mime.types and/or $HOME/.mime.types and the format is simply that each line is a space-delimited list of a MIME type, followed by zero or more extensions.