The hidden language that tells your computer what a file actually is

The hidden language that tells your computer what a file actually is
Image: Intellect (generated)

In short: Your computer doesn't actually know what a .jpg or .html file is by looking at the name. Instead, it relies on a two-part identifier called a media type. This invisible taxonomy allows the internet to distinguish between a song, a photo, and a webpage, ensuring your browser knows exactly how to render every byte of data it receives.

Originally defined in November 1996 as part of the MIME (Multipurpose Internet Mail Extensions) specification, these identifiers were designed to denote the content of email messages and attachments. While they began as a way to handle mail, they have since become the backbone of the modern internet, powering protocols like HTTP and document formats like HTML. Today, the Internet Assigned Numbers Authority (IANA) is the official body responsible for standardizing these classifications.

The structure of a media type is hierarchical, consisting of a broad 'type' and a specific 'subtype.' For example, in 'text/html; charset=UTF-8,' 'text' is the type and 'html' is the subtype. There are also optional parameters, like character encoding, and suffixes that describe underlying structures (such as +xml or +json). To keep the system organized, IANA manages four distinct registration trees: the 'standards' tree for public web standards, the 'vendor' tree for commercial products (using the vnd. prefix), the 'personal' tree for experimental types (prs.), and the 'unregistered' tree for private use (x.).

Interestingly, the terminology is currently contested among major web standards bodies. While the IANA and IETF prefer the term 'media type' and consider 'MIME type' obsolete, the WHATWG continues to use 'MIME type' to avoid ambiguity with CSS @media features. Because many file systems do not store this metadata directly, systems often rely on a fallback file called 'mime.types,' which maps common filename extensions to their corresponding media types, allowing the software to bridge the gap between a name and its actual function.

Opens the Intellect+ feed with this card first. Swipe up for the next one.

Sources

To cite this card, link to https://intellectplus.co.uk/app/ideas-media-type.

How we source, check and correct cards: Editorial standards.

General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.

Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?

Related

Finding something worth knowing…