This article may be confusing or unclear to readers.(April 2023) |
In information and communications technology, a media type, [1] [2] content type [2] [3] or MIME type [1] [4] [5] is a two-part identifier for file formats and format contents. Their purpose is comparable to filename extensions and uniform type identifiers, in that they identify the intended data format. They are mainly used by technologies underpinning the Internet, 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 RFC 2045 (MIME) Part One: Format of Internet Message Bodies (Nov 1996) in November 1996 as a part of the MIME (Multipurpose Internet Mail Extensions) specification, for denoting type of email message content and attachments; [6] hence the original name, MIME type. Media types are also used by other internet protocols such as HTTP, [7] document file formats such as HTML, [8] and the XDG specifications implemented by Linux desktop environments, [5] for similar purposes.
Different internet standards or web standards bodies differ on the preferred term for this type of identifier.
The IANA and IETF use the term "media type", and consider the term "MIME type" to be obsolete, [1] since media types have become used in contexts unrelated to email, such as HTTP. By contrast, the WHATWG 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 @media
feature. [4]
The HTTP response header for providing the media type is Content-Type
. [2] The W3C has used ContentType
as an XML data-type name for a media type. [3] XDG specifications implemented by Linux desktop environments continue to use the term "MIME type". [5]
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:
mime-type =type "/"[tree "."]subtype ["+"suffix]*[";"parameter];
As an example, an HTML file might be designated text/html; charset=UTF-8
. In this example, text
is the type, html
is the subtype, and charset=UTF-8
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. [6]
The "type" part defines the broad use of the media type. As of November 1996, the registered types were: application
, audio
,image
, message
, multipart
, text
and video
. [6] By July 2024, the registered types included the foregoing, plus font
, example
, model
, and haptics
. [1]
An unofficial top-level type in common use is chemical
, used for chemical file formats. [9] [10] [11] In the context of Linux desktop environments, the unofficial top-level types inode
(inodes other than normal files, such as filesystem directories, device files or symbolic links), [12] x-content
(removable media, such as x-content/image-dcf
for DCF digital cameras), [13] package
(package manager packages) [14] and x-office
(generic categories of office productivity software document) [14] are used.
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 (vnd.
prefix), personal or vanity (prs.
prefix), unregistered (x.
prefix). These registration trees were first defined in November 1996 (obsoleted RFC 2048 - currently RFC 6838). New registration trees may be created by IETF Standards Action for external registration and management by well-known permanent organizations (e.g. scientific societies).
The standards tree does not use any tree prefix. Examples are text/javascript
, image/png
. [15]
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.
The vendor tree includes media types associated with publicly available products. It uses the vnd.
tree prefix. Examples are: application/vnd.ms-excel
, application/vnd.oasis.opendocument.text
.
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.
The personal or vanity tree includes media types associated with non publicly available products or experimental media types. It uses the prs.
tree prefix. Examples are audio/prs.sid
, image/prs.btif
.
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 x.
tree prefix. Examples are application/x.foo
, video/x.bar
. Media types in this tree cannot be registered.
This type was originally defined in RFC 1590 (published in September 1993) using the x-
or X-
prefix. RFC 2048 (published in November 1996) introduced the x.
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 x-
or X-
are no longer considered to be members of this tree.
Media types that have been widely deployed (with a subtype prefixed with x-
or X-
) 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. application/x-www-form-urlencoded
is an example of a widely deployed type that ended up registered with the x-
prefix. [16]
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 "+"suffix
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. [15]
The +xml suffix has been defined since January 2001 (RFC 3023 [17] ), and was formally included in the initial contents of the Structured Syntax Suffix Registry along with +json
, +ber
, +der
, +fastinfoset
, +wbxml
, and +zip
in January 2013 (RFC 6839). Subsequent additions include +gzip
, +cbor
, +json-seq
, and +cbor-seq
. [18]
From the IANA registry: [1]
application/json
application/ld+json
(JSON-LD)application/msword
(.doc)application/pdf
application/sql
application/vnd.api+json
application/vnd.microsoft.portable-executable
(.efi, .exe, .dll)application/vnd.ms-excel
(.xls)application/vnd.ms-powerpoint
(.ppt)application/vnd.oasis.opendocument.text
(.odt)application/vnd.openxmlformats-officedocument.presentationml.presentation
(.pptx)application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
(.xlsx)application/vnd.openxmlformats-officedocument.wordprocessingml.document
(.docx)application/x-www-form-urlencoded
application/xml
application/zip
application/zstd
(.zst)audio/mpeg
audio/ogg
image/avif
image/jpeg
(.jpg, .jpeg, .jfif, .pjpeg, .pjp) [19] image/png
image/svg+xml
(.svg)image/tiff
(.tif)model/obj
(.obj)multipart/form-data
text/plain
text/css
text/csv
text/html
text/javascript
(.js)text/xml
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.
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 application/octet-stream
, 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: mime.types
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 .htm
and .html
by the following line:
text/html htm html
This section is missing information about Netscape.(November 2019) |
The mime.types file dates to Netscape, where it used a different format; [20] 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
Electronic mail is a method of transmitting and receiving messages using electronic devices. It was conceived in the late–20th century as the digital version of, or counterpart to, mail. Email is a ubiquitous and very widely used communication medium; in current use, an email address is often treated as a basic and necessary part of many processes in business, commerce, government, education, entertainment, and other spheres of daily life in most countries.
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 (CSS) and scripting languages such as JavaScript.
Multipurpose Internet Mail Extensions (MIME) is a standard that extends the format of email messages to support text in character sets other than ASCII, as well as attachments of audio, video, images, and application programs. Message bodies may consist of multiple parts, and header information may be specified in non-ASCII character sets. Email messages with MIME formatting are typically transmitted with standard protocols, such as the Simple Mail Transfer Protocol (SMTP), the Post Office Protocol (POP), and the Internet Message Access Protocol (IMAP).
vCard, also known as VCF, is a file format standard for electronic business cards. vCards can be attached to e-mail messages, sent via Multimedia Messaging Service (MMS), on the World Wide Web, instant messaging, NFC or through QR code. They can contain name and address information, phone numbers, e-mail addresses, URLs, logos, photographs, and audio clips.
Advanced Systems Format is Microsoft's proprietary digital audio/digital video container format, especially meant for streaming media. ASF is part of the Media Foundation framework.
The Internet Calendaring and Scheduling Core Object Specification (iCalendar) is a media type which allows users to store and exchange calendaring and scheduling information such as events, to-dos, journal entries, and free/busy information, and together with its associated standards has been a cornerstone of the standardization and interoperability of digital calendars across different vendors. Files formatted according to the specification usually have an extension of .ics. With supporting software, such as an email reader or calendar application, recipients of an iCalendar data file can respond to the sender easily or counter-propose another meeting date/time. The file format is specified in a proposed Internet standard for calendar data exchange. The standard and file type are sometimes referred to as "iCal", which was the name of the Apple Inc. calendar program until 2012, which provides one of the implementations of the standard.
Web standards are the formal, non-proprietary standards and other technical specifications that define and describe aspects of the World Wide Web. In recent years, the term has been more frequently associated with the trend of endorsing a set of standardized best practices for building web sites, and a philosophy of web design and development that includes those methods.
OPML is an XML format for outlines. Originally developed by UserLand Software as a native file format for the outliner application in its Radio UserLand product, it has since been adopted for other uses, the most common being to exchange lists of web feeds between web feed aggregators.
M3U is a computer file format for a multimedia playlist. One common use of the M3U file format is creating a single-entry playlist file pointing to a stream on the Internet. The created file provides easy access to that stream and is often used in downloads from a website, for emailing, and for listening to Internet radio.
JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays. It is a commonly used data format with diverse uses in electronic data interchange, including that of web applications with servers.
In computer hypertext, a URI fragment is a string of characters that refers to a resource that is subordinate to another, primary resource. The primary resource is identified by a Uniform Resource Identifier (URI), and the fragment identifier points to the subordinate resource.
This article describes the technical specifications of the OpenDocument office document standard, as developed by the OASIS industry consortium. A variety of organizations developed the standard publicly and make it publicly accessible, meaning it can be implemented by anyone without restriction. The OpenDocument format aims to provide an open alternative to proprietary document formats.
An IETF BCP 47 language tag is a standardized code that is used to identify human languages on the Internet. The tag structure has been standardized by the Internet Engineering Task Force (IETF) in Best Current Practice (BCP) 47; the subtags are maintained by the IANA Language Subtag Registry.
The Open Packaging Conventions (OPC) is a container-file technology initially created by Microsoft to store a combination of XML and non-XML files that together form a single entity such as an Open XML Paper Specification (OpenXPS) document. OPC-based file formats combine the advantages of leaving the independent file entities embedded in the document intact and resulting in much smaller files compared to normal use of XML.
Ned Freed was an IETF participant and Request for Comments author who contributed to a significant number of Internet Protocol standards, mostly related to email. He is best known as the co-inventor of email MIME attachments, with Nathaniel Borenstein.
A Formal Public Identifier (FPI) is a short piece of text with a particular structure that may be used to uniquely identify a product, specification or document. FPIs were introduced as part of Standard Generalized Markup Language (SGML), and serve particular purposes in formats historically derived from SGML. Some of their most common uses are as part of document type declarations (DOCTYPEs) and document type definitions (DTDs) in SGML, XML and historically HTML, but they are also used in the vCard and iCalendar file formats to identify the software product which generated the file.
A file format is a 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 or free.
Yet Another Next Generation is a data modeling language for the definition of data sent over network management protocols such as the NETCONF and RESTCONF. The YANG data modeling language is maintained by the NETMOD working group in the Internet Engineering Task Force (IETF) and initially was published as RFC 6020 in October 2010, with an update in August 2016. The data modeling language can be used to model both configuration data as well as state data of network elements. Furthermore, YANG can be used to define the format of event notifications emitted by network elements and it allows data modelers to define the signature of remote procedure calls that can be invoked on network elements via the NETCONF protocol. The language, being protocol independent, can then be converted into any encoding format, e.g. XML or JSON, that the network configuration protocol supports.
The Registration Data Access Protocol (RDAP) is a computer network communications protocol standardized by a working group at the Internet Engineering Task Force in 2015, after experimental developments and thorough discussions. It is a successor to the WHOIS protocol, used to look up relevant registration data from such Internet resources as domain names, IP addresses, and autonomous system numbers.
[RFC2046] specifies that Media Types (formerly known as MIME types) and Media Subtypes will be assigned and listed by the IANA.
HTTP uses media types [RFC2046] in the Content-Type (Section 8.3) and Accept (Section 12.5.1) header fields in order to provide open and extensible data typing and type negotiation.
ContentType: A media type, as per [RFC2045].
Standards are encouraged to consistently use the term MIME type to avoid confusion with the use of media type as described in Media Queries.