Internet media type and MIME type or sometimes said as content-type, classifies the data in the body of a message in the Internet. As explained in the MIME standard ; data the server sends for example, plain text, an HTML document or a PNG image it is used to define. In e-mails, the Content-Type header field is used to classify the various data. We wrote about MIME or Multipurpose Internet Mail Extensions Types in previous publication, in this article Internet Media Type will be discussed in detail.
What is this Internet Media Type
Internet media type consists of two parts: the specification of a media type and specification of a subtype. The two statements are separated by a slash. Typical example of describing Internet Media Type is – application/atom+xml.
The following are commonly used Internet Media Type :
text – Text
image – graphics
video – for video
audio – audio data
application – for uninterpreted binary data, mixed formats (eg text documents with embedded data) or information to be processed by a particular program
multipart – for multi-part data
message – for news, for example message/rfc822
model – for data that represent multi-dimensional structures
example – as media type for documentation
There are currently more than 130 subtypes defined under Internet Media Type, each generation of computers also integrated with a variety of media types of its own .
MIME-sniffing in Internet Media Type
If there is no indication of the MIME type, MIME Sniffing recognize the MIME type. First, the first byte of the document needs to be read. Images in the format of JPEG or PNG can easily be distinguished in its header. If the analysis fails, the file extension is used. Then either a standard representation is attempted, for example, opening as a HTML file or the process is aborted with an error message.
The order of analysis is set out in Protocol documents.
Practical Example of Internet Media Type and MIME Type
Writing about Internet Media Type has no value if there is no proper practical example is given. We use webpagetest.org to test the web site’s loading time. The web software simulates as if a human is opening a webpage. You can see the contents of the home page of the website has been analyzed by the software and labeled as MIME Types. Internet Media Type is nothing but an orderly expression that is understandable by a computer and a human.