MIME Type
Main Source:
MIME type, or media type, is a two-part identifier for file formats and format contents transmitted on the internet. It is used to indicate the type of data that is being transmitted, so that the recipient knows how to handle it.
MIME type syntax
Section titled “MIME type syntax”MIME type syntax looks like the following: type "/" [tree "."] subtype ["+" suffix]* [";" parameter];
typeis the general category of the data, such as text, image, audio, or video.treeis an optional prefix that can be used to further categorize the data. For example, the type application can have the treex-to indicate that it is an experimental format.subtypeis the specific format of the data, such as plain text, HTML, PDF, MS Word document.suffixis an optional suffix that can be used to represent specific structure of the format. For example, the suffixxmlcan be used to classify XML data, and the suffixjsoncan be used to classify JSON data.parameteris an optional parameter that can be used to provide additional information or metadata about the data. For example, the parameter charset can be used to specify the character encoding of the text data.
For example, a MIME type for JPEG file is image/jpeg; charset=utf-8
Other examples:
text/plain: plain textimage/jpeg: JPEG imagesaudio/mp3: MP3 audiovideo/mp4: MP4 videosapplication/pdf: PDF documentsapplication/msword: Microsoft Word documentsapplication/zip: ZIP archives.