What is the Mime? known also as Media Type

Type

The term Internet media type refers to the type of a resource (in short, it tells the structure)

Why Mime ?

The Internet media type is also known as MIME (Multipurpose Internet Mail Extensions) because the media type definition started with the email mime. but ultimately, the media type is the first part of a mime.

For example:

Content-Type: text/plain; charset=us-ascii

  • the mime or media type is: text/plain (Note that charset is the character set)

Syntax

A media type has the following syntax:

type/subtype

where type is one of the five discrete top-level media types:

  • text for textual information where the subtype:
  • image for image data where the subtypes define the formats (Example: jpeg, gif)
  • audio for audio data. “basic” behind the default subtype.
  • video for video data. The default and initial subtype is mpeg
  • application - for other kind of data that are readable by an application (by default binary data with the subtype octet-stream where the structure is not standardized )

The specific syntax rule is: A string is a valid MIME type with no parameters if it matches the media-type rule defined in section 3.1.1.1 “Media Types” of RFC 7231, but does not contain any ; U+003B characters. In other words, if it consists only of a type and subtype, with no MIME Type parameters.

Plugin

A user agent must not consider the types text/plain and application/octet-stream as having a registered plugin.

List

Registry

The registry is the full published list of media type. It's available at: registry

Example:

audio/mpeg
image/gif
image/jpeg
text/css
text/html
text/javascript
video/mpeg
video/quicktime

Html

  • text/html: HTML document

XML

The term XML MIME type is used to refer to the MIME types:

  • text/xml,
  • application/xml,
  • and any MIME type whose subtype ends with the four characters “+xml”.

RFC3023 - XML Media Types

x-www-form-urlencoded

Media Type - x-www-form-urlencoded

Write once, read many

See What are the Read-optimized File Formats (write once, read many)?

Detection

You can detect it:

Library

Java: probeContentType

Documentation / Reference





Discover More
(HTTP|HTTPS) - Hypertext Transfer Protocol

Hypertext Transfer Protocol (HTTP) is the transfer protocol to exchange or transfer web resource between nodes (host). The H in HTTP means an hypertext (ie HTML). The protocol was first designed...
A web resource is the data of the web

This articles shows what a web resource is, how to access it and how it's defined. Web resources is also known as web content. The most known web resource is an html page with its CSS and Javascript but...
Browser
Browser - Cross-Origin Read Blocking (CORB)

Cross-Origin Read Blocking (CORB) is a security feature that prevents the contents of a resource from ever entering the memory of the renderer process memory based on its MIME type. The main motivation...
CSS - Style Sheet (Script|File) - Stylesheet

A stylesheet is a list of rules that specify the presentation of a source document. The stylesheet is a combination of : the external files with the suffix css defined via the HTML link element the...
D3 Csv Console Log
D3 - Csv Function (CSV from an URL )

This section talks the function d3.csv that parse a CSV file. To parse a CSV string, see . Reference: Csv The csv file or string must...
Git - Blob

blob in git is a object of the blob type that corresponds / represents the file contents (or inodes) in the git file system. file This command will put a blob in the object database where: the...
Git - Objects (Database)

An object is the value in the entry of the git database key-value. All entities in git are objects. Objects are the entity of the Git file system. On the operating file system, the objects are stored...
HTML - (Document) Parser

HTML documents consist of a tree of elements and text. The specification defines a set of elements that can be used in HTML, along with rules. If a document is transmitted with the text/html mime type,...
HTML - multipart/form-data encoding / mime

multipart/form-data is a mime part used in the enctype form attribute to encode the keyword and corresponding state of input field before sending into the body of the HTTP request formdata This encoding...
HTTP - Accept header

accept is a request header that specify the mimes type of the response body that are accepted by the client (ie browser) If no Accept header field is present, then it is assumed that the client accepts...



Share this page:
Follow us:
Task Runner