In
information and communications technology
Information and communications technology (ICT) is an extensional term for information technology (IT) that stresses the role of unified communications and the integration of telecommunications (telephone lines and wireless signals) and computer ...
, a media type,
content type
or MIME type
is a two-part identifier for
file format
A file format is a Computer standard, standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary format, pr ...
s and
content formats. Their purpose is comparable to
filename extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
s and
uniform type identifiers, in that they identify the intended data format. They are mainly used by technologies underpinning the
Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
, and also used on
Linux desktop systems.
The
Internet Assigned Numbers Authority (IANA) is the official authority for the standardization and publication of these classifications. Media types were originally defined in Request for Comments (MIME) Part One: Format of Internet Message Bodies (Nov 1996) in November 1996 as a part of the ''
MIME
A mime artist, or simply mime (from Greek language, Greek , , "imitator, actor"), is a person who uses ''mime'' (also called ''pantomime'' outside of Britain), the acting out of a story through body motions without the use of speech, as a the ...
(Multipurpose Internet Mail Extensions)'' specification, for denoting type of
email
Electronic mail (usually shortened to email; alternatively hyphenated e-mail) is a method of transmitting and receiving Digital media, digital messages using electronics, electronic devices over a computer network. It was conceived in the ...
message content and attachments;
hence the original name, ''MIME type''. Media types are also used by other internet protocols such as
HTTP
HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
, document file formats such as
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
, and the
XDG specifications implemented by Linux
desktop environment
In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphi ...
s,
for similar purposes.
Terminology
Different internet standards or web standards bodies differ on the preferred term for this type of identifier.
The
IANA
The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, autonomous system number allocation, root zone management in the Domain Name System (DNS), media types, and other Internet P ...
and
IETF
The Internet Engineering Task Force (IETF) is a standards organization for the Internet standard, Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster ...
use the term "media type", and consider the term "MIME type" to be obsolete,
since media types have become used in contexts unrelated to email, such as HTTP. By contrast, the
WHATWG
The Web Hypertext Application Technology Working Group (WHATWG) is a community of people interested in evolving HTML and related technologies. The WHATWG was founded by individuals from Apple Inc., the Mozilla Foundation and Opera Software, ...
continues to use the term "MIME type" and discourages use of the term "media type" as ambiguous, since it is used with a different meaning in connection with the
CSS feature.
The
HTTP
HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
response header for providing the media type is .
The
W3C
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
has used as an
XML data-type name for a media type.
XDG specifications implemented by Linux
desktop environment
In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphi ...
s continue to use the term "MIME type".
Structure
A media type consists of a ''type'' and a ''subtype'', which is further structured into a ''tree''. A media type can optionally define a ''suffix'' and ''parameters'':
:
As an example, an HTML file might be designated . In this example, is the type, is the subtype, and is an optional parameter indicating the character encoding.
Types, subtypes, and parameter names are case-insensitive. Parameter values are usually case-sensitive, but may be interpreted in a case-insensitive fashion depending on the intended use.
Types
The "type" part defines the broad use of the media type. As of November 1996, the registered types were: , ,, , , and .
[ By July 2024, the registered types included the foregoing, plus , , , and .][
An unofficial top-level type in common use is , used for ]chemical file format
A chemical file format is a type of data file which is used specifically for depicting molecular data. One of the most widely used is the chemical table file format, which is similar to ''Structure Data Format'' (SDF) files. They are text files ...
s. In the context of Linux desktop environment
In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphi ...
s, the unofficial top-level types (inode
An inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object's data. File-system object attribu ...
s other than normal files, such as filesystem directories, device file
In Unix-like operating systems, a device file, device node, or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These s ...
s or symbolic link
In computing, a symbolic link (also symlink or soft link) is a file whose purpose is to point to a file or directory (called the "target") by specifying a path thereto.
Symbolic links are supported by POSIX and by most Unix-like operating syste ...
s), (removable media
In computing, a removable media is a data storage media that is designed to be readily inserted and removed from a system. Most early removable media, such as floppy disks and optical discs, require a dedicated read/write device (i.e. a drive) ...
, such as for DCF digital cameras), (package manager
A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
A package manager deals wi ...
packages) and (generic categories of office productivity software
Productivity software (also called personal productivity software or office productivity software) is application software used for producing information (such as documents, presentations, worksheets, databases, charts, Information graphics, graph ...
document) are used.
Subtypes
A subtype typically consists of a media format, but it may or must also contain other content, such as a tree prefix, producer, product or suffix, according to the different rules in registration trees.
All media types should be registered using the IANA registration procedures. For the efficiency and flexibility of the media type registration process, different structures of subtypes can be registered in registration trees that are distinguished by the use of tree prefixes. Currently the following trees are created: standard (no prefix), vendor ( prefix), personal or vanity ( prefix), unregistered ( prefix). These registration trees were first defined in November 1996 (obsoleted RFC 2048 - currently RFC 6838). New registration trees may be created by IETF
The Internet Engineering Task Force (IETF) is a standards organization for the Internet standard, Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster ...
Standards Action for external registration and management by well-known permanent organizations (e.g. scientific societies).
Standards tree
The standards tree does not use any tree prefix. Examples are , .
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.
Vendor tree
The vendor tree includes media types associated with publicly available products. It uses the tree prefix. Examples are: , .
The terms "vendor" and "producer" are considered equivalent in the context. Industry consortia as well as non-commercial entities can register media types in the vendor tree. A registration in the vendor tree may be created by anyone who needs to interchange files associated with some software product or set of products. However, the registration belongs to the vendor or organization producing the software that employs the type being registered, and that vendor or organization can at any time elect to assert ownership of a registration done by a third party.
Personal or vanity tree
The personal or vanity tree includes media types associated with non publicly available products or experimental media types. It uses the tree prefix. Examples are , .
Unregistered 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. It uses the tree prefix. Examples are , . Media types in this tree cannot be registered.
This type was originally defined in RFC 1590 (published in September 1993) using the or prefix. RFC 2048 (published in November 1996) introduced the prefix, but discouraged use of the unregistered tree, as new personal and vendor trees with relaxed registration requirements are now available. The current RFC 6838 (published in January 2013) maintains the same recommendation, but subtypes prefixed with or are no longer considered to be members of this tree.
Media types that have been widely deployed (with a subtype prefixed with or ) without being registered, should be, if possible, re-registered with a proper prefixed subtype. If this is not possible, the media type can, after an approval by both the media types reviewer and the IESG, be registered in the standards tree with its unprefixed subtype. is an example of a widely deployed type that ended up registered with the prefix.
Suffix
Suffix is an augmentation to the media type definition to additionally specify the underlying structure of that media type, allowing for generic processing based on that structure and independent of the exact type's particular semantics. Media types that make use of a named structured syntax should use the appropriate IANA registered for that structured syntax when they are registered. Unregistered suffixes should not be used (since January 2013). Structured syntax suffix registration procedures are defined in RFC 6838.[
The +xml suffix has been defined since January 2001 (RFC 3023), and was formally included in the initial contents of the Structured Syntax Suffix Registry along with , , , , , and in January 2013 (RFC 6839). Subsequent additions include , , , and .
]
Common examples
From the IANA registry:[
*
* ( JSON-LD)
* (.doc)
*
*
*
* (.efi, .exe, .dll)
* (.xls)
* (.ppt)
* (.odt)
* (.pptx)
* (.xlsx)
* (.docx)
*
*
*
* (.zst)
*
*
*
* (.jpg, .jpeg, .jfif, .pjpeg, .pjp)
*
* (.svg)
* (.tif)
* (.obj)
*
*
*
*
*
* (.js)
*
]
Mailcap
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. The mailcap format is defined by RFC 1524 "A User Agent Configuration Mechanism for Multimedia Mail Format Information" but is not defined as an Internet standard. It is supported by most Unix systems.
Lines can be comments starting with the # character, or a mime-type followed by how to handle that mime type.
mime.types
An associated file is the mime.types file, which associates filename extensions with a ''MIME type''. If the MIME type is properly set, this is unnecessary, but MIME types may be incorrectly set, or set to a generic type such as , and mime.types allows one to fall back on the extension in these cases. Similarly, since many file systems do not store MIME type information, but instead rely on the filename extension, a mime.types file is frequently used by web servers to determine MIME type.
When ''viewing'' a file, these two work together as follows: associates an extension with a MIME type, while mailcap
associates a MIME type with a program.
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. For example, the HTML type can be associated with the extensions and by the following line:
text/html htm html
Netscape use
The mime.types file dates to Netscape
Netscape Communications Corporation (originally Mosaic Communications Corporation) was an American independent computer services company with headquarters in Mountain View, California, and then Dulles, Virginia. Its Netscape web browser was o ...
, where it used a different format;[WEBMASTERS]
mime types
, John McAnally, Thu, 22 Jan 1998 15:29:29 -0600 (CST) it used key–value pairs and a comma-separated list of extensions, together with a standard header consisting of a specific comment that identifies the file as a mime.types file, as follows:
#--Netscape Communications Corporation MIME Information
# Do not delete the above line. It is used to identify the file type.
type=text/html exts=htm,html
See also
* Content negotiation
In computing, content negotiation refers to mechanisms defined as a part of HTTP that make it possible to serve different versions of a document (or more generally, representations of a resource) at the same URI, so that user agents can specify w ...
* Content sniffing
* Filename extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
References
External links
*
IANA list of official media types
* ttps://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types Common MIME typesfro
Mozilla MDN
{{DEFAULTSORT:Internet Media Type
Internet architecture
Computer file formats
Metadata
MIME
Linux
1996 introductions