Search notes:

Multipurpose Internet Mail Extensions

Media types and subtypes

A media type (formerly known as MIME type) describes the kind of document that is transmitted from server to client.
A media type consists of a type and a subtype and optional parameters:
type "/" [tree "."] subtype ["+" suffix]* [";" parameter]
Examples for media types are application/pdf or image/jpeg.
Registered types are:
chemical is an unofficial top-level name in common use.
In HTTP, the media type is defined with the HTTP header Content-Type.

.vnd, .x and .prs types

In theory, all mime types are registered with IANA (»Internet Assigned Numbers Authority«).
However, some vendors choose to use unofficial types and prepend them with x- (or more modernly x.?).
Vendor specific media sub-types start with vnd. (for example application/vnd.github.mercy-preview+json).
Personal (vanity) specific media sub-types start with prs..

Determining the MIME type string of a file

The -i option of the file command line program shows the MIME type string of a file.

Association between MIME type and application

Within the XDG standard, xdg-utils can be used to associated MIME types with applications.

Relevant RFCs

RFC 2045: MIME Part One: Format of Internet Message Bodies
RFC 2046: MIME Part Two: Media Types
RFC 2047: MIME Part Three: Message Header Extensions for Non-ASCII Text
RFC 2048: MIME Part Four: Registration Procedures
RFC 2049: MIME Part Five: Conformance Criteria and Examples
Related RFCs
RFC 1524: The formal description of mailcap files. Mailcap files describe how to handle media types.
RFC 2015: MIME Security with Pretty Good Privacy (PGP).
RFC 2110: MIME E-mail Encapsulation of Aggregate Documents, such as HTML (MHTML).
RFC 2111: Content-ID and Message-ID Uniform Resource Locators.
RFC 2112: The MIME Multipart/Related Content-type.
RFC 2183: Defines the syntax and sematics of the "Content-Disposition" header to convey presentational information.
RFC 2184: MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations
See also RFC

See also

The HTTP Accept request header indicates the content types (expressed as MIME types) a client understands.
The Perl modules
/usr/share/mime, /etc/mime.types
Base64
The shell command xdg-mime.
web
Registry key HKEY_CLASSES_ROOT\MIME

Index