Internet Media Type

The Internet Media Type, and MIME type ( according to the specification Multipurpose Internet Mail Extensions ) or Content-Type (after the name of the field), classifies the data in the body of a message on the Internet. As explained in the standard MIME is sent when an HTTP transfer, for example, a browser, the Web server sends the data - whether it is plain text, for example, an HTML document or a PNG image. Even in emails the "Content-Type " header field is used to classify the different data.

The Internet Media Type is composed of two parts: the specification of a media type and the specification of a subtype. The two statements are separated by a slash, eg image / jpeg.

There are the following types of media:

  • Application - for uninterpreted binary data, mixed formats (eg text documents with embedded nichttextuellen data) or information that can be processed by a particular program should
  • Audio - for audio data
  • Example - sample media type for documentation
  • Image - the graphics
  • Message - for messages, such as message/rfc822
  • Model - for data representing multidimensional structures
  • Multipart - for multipart data
  • Text - for text
  • Video - for video

There are currently over 130 defined subtypes, in addition, each computer generation integrates a variety of own media types. Managed the media types by the Internet Assigned Numbers Authority.

MIME sniffing

If not specified the MIME type, the MIME Sniffing to detect the MIME type. For this, the first byte of the document to be read. Images in JPEG or PNG format are easily distinguished on its header. Should the analysis fails, the file extension will be used. Then either a standard representation is attempted, for example, playing as an HTML file, or playback is aborted with an error message.

The order of analysis is specified in protocol documents. So asks the HTTP1.1 document that getting the specified content type to use. Only if he is absent, may MIME sniffing guess the type.

200986
de