ArticleslgStudy

computer science

Media type

Media type is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Media type rather than just read about it. In short: In information and communications technology, a media type, content type or MIME type is a two-part identifier for file formats and content formats. Their purpose is comparable to filename extensions and uniform type identifiers, in that they identify the intended data format.

Key takeaways

  • Media type belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Media type to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Media type from memory before moving on to harder problems.

Reference excerpt

In information and communications technology, a media type, content type or MIME type is a two-part identifier for file formats and content formats. 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; hence the original name, MIME type. Media types are also used by other internet protocols such as HTTP, document file formats such as HTML, and the XDG specifications implemented by Linux desktop environments, for similar purposes.

Terminology 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, 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. The HTTP response header for providing the media type is Content-Type. The W3C has used ContentType as an XML data-type name for a media type. XDG specifications implemented by Linux desktop environments 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 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.

Types 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. By July 2024, the registered types included the foregoing, plus font, example, model, and haptics. An unofficial top-level type in common use is chemical, used for chemical file formats. 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), x-content (removable media, such as x-content/image-dcf for DCF digital cameras), package (package manager packages) and x-office (generic categories of office productivity software 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 (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).

Standards tree The standards tree does not use any tree prefix. Examples are text/javascript, image/png. 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 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.

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 prs. tree prefix. Examples are audio/prs.sid, image/prs.btif.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Media type

Start with the simplest possible case. Write down what Media type claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Media type before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Media type ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Media type

In research
Media type appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Media type in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Media type is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1996 introductions, Computer file formats, Internet architecture, so understanding it makes those chapters shorter.
In everyday life
Look for Media type outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Media type in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Media type means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Media type out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Media type in simple terms?

In information and communications technology, a media type, content type or MIME type is a two-part identifier for file formats and content formats. Their purpose is comparable to filename extensions and uniform type identifiers, in that they identify the intended data format.

Why does Media type matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Media type?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Media type.

Tags

  • 1996 introductions
  • Computer file formats
  • Internet architecture
  • Linux
  • MIME
  • Metadata

Keep exploring