Internet Media Type
The Internet Media Type , also MIME-Type (according to the Multipurpose Internet Mail Extensions specification ) or Content-Type (according to the name of the field), classifies the data in the body of a message on the Internet . As explained in the MIME standard, z. For example, in the case of an HTTP transmission, a browser is informed of which data the web server is sending - whether it is, for example, a plain text document, an HTML document or a PNG image. The "Content-Type" header field is also used in e-mails to classify the various data.
The Internet Media Type consists of two parts: specifying a media type and specifying a sub-type. Both entries are separated from each other by a slash, example image / jpeg .
- application - for uninterpreted binary data, mixed formats (e.g. text documents with embedded non-textual data) or information that is to be processed by a specific program
- audio - for audio data
- example - sample media type for documentation
- image - for graphics
- message - for messages, for example message / rfc822
- model - for data representing multi-dimensional structures
- multipart - for multipart data
- text - for text
- video - for video material
- chemical - for z. E.g .: molecules (unofficial)
Over 130 subtypes are currently defined, and each generation of computers also integrates a large number of its own media types. The media types are managed by the Internet Assigned Numbers Authority .
A media type consists of a type and a sub-type that are structured as a tree . A media type can optionally also contain a suffix and parameters :
Typ "/" [Baum "."] Subtyp ["+" Suffix] *[";" Parameter]
If the MIME type is not specified, MIME sniffing should recognize the MIME type. First the first bytes of the document are read. Images in JPEG or PNG format can be easily distinguished by their header ( magic number ). If the analysis fails, the file extension is used. Then either a standard display is attempted, for example playback as an HTML file, or playback is aborted with an error message.
The order of the analysis is specified in protocol documents. The HTTP1.1 document demands that the specified content type is always used. MIME sniffing is only allowed to guess the type if it is missing.
- M. Sirbu: RFC 1049 . - A content-type header field for internet messages . March 1988. (First specification - English).
- N. Freed, N. Borenstein: RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies . [Errata: RFC 2045 ]. November 1996. Section 5: Content-Type Header Field. (Replaces RFC 1590 - Updated by RFC 2184 - English).
- R. Fielding, UC Irvine, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach, T. Berners-Lee: RFC 2616 - Hypertext Transfer Protocol - HTTP / 1.1 . [Errata: RFC 2616 ]. June 1999. Section 14.17: Content-Type. (Replaces RFC 2068 - Updated by RFC 2817 - English).
- N. Freed, N. Borenstein: RFC 2046 . - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types . [Errata: RFC 2046 ]. November 1996. (Replaces RFC 1521 - Updated by RFC 2646 - English).
- S. Nelson, C. Parks: RFC 2077 . - The Model Primary Content Type for Multipurpose Internet Mail Extensions . January 1997. (English).
- T. Taylor: RFC 4735 . - Example Media Types for Use in Documentation . October 2006. Standard: [Proposed]. (English).
- List of IANA
- Overview of MIME types with the corresponding file extensions in the SELFHTML Wiki
- Apache Server: Assignment of file extensions to MIME types, from 1999 to today