Internet media type

From Helpful

This article/section is a stub — probably a pile of half-sorted notes and assertions some of which may well be wrong, and not verified as a whole. Feel free to add or refine.

Internet Media Type, previously known as MIME type, and sometimes referred to as Content-Type (from the HTTP header it is often seen in) is the the type/subtype form used in Content-type headers in each part of a MIME message, in HTTP, and in various other places.


For example, its use in a HTTP header:

Content-Type: text/plain; charset="utf-8"

The charset part is optional


The official list of MIME types is kept by IANA: http://www.iana.org/assignments/media-types/

Every use of types not registered with iana should start with x-, though this is not always respected.

vnd can be used for vendor-specific types.


Note that the value in charset should strictly speaking be chosen from an IANA list, and clients may be strict in that they can be treated in a case sensitive way, meaning that e.g. there are various way to mis-specify each.

For example, UTF-8 and UTF8, and utf8 are all invalid in a Content-Type; it should be utf-8. While browsers may not trip over mistakes (or rather, are permissive when the msitake is common enough), some browsers and various non-browser UAs other things might.


See also: