Content Type is also known as MIME (Multipurpose internet Mail Extension) Type. It is a HTTP header that provides the description about what are you sending to the browser.
MIME is an internet standard that is used for extending the limited capabilities of email by allowing the insertion of sounds, images and text in a message.
The features provided by MIME to the email services are as given below:
- It supports the non-ASCII characters
- It supports the multiple attachments in a single message
- It supports the attachment which contains executable audio, images and video files etc.
- It supports the unlimited message length.
Content Type
@reference_2_developer.mozilla.org
Content-Type
@reference_3_developer.mozilla.org
MIME types
What is a MIME type?
MIME stands for "Multipurpose Internet Mail Extensions. It's a way of identifying files on the Internet according to their nature and format. For example, using the "Content-type" header value defined in a HTTP response, the browser can open the file with the proper extension/plugin.What is an Internet Media Type?
"Internet Media Type" is the same as a MIME type. MIME types were originally created for emails sent using the SMTP protocol. Nowadays, this standard is used in a lot of other protocols, hence the new naming convention "Internet Media Type".What is a Content-Type?
A "Content-type" is simply a header defined in many protocols, such as HTTP, that makes use of MIME types to specify the nature of the file currently being handled.What does a MIME type look like?
A MIME type is a string identifier composed of two parts: a "type" and a "subtype". The "type" refers to a logical grouping of many MIME types that are closely related to each other; it's no more than a high level category. "subtypes" are specific to one file type within the "type".For example, the MIME value "application/xml" is used for XML documents and specifies that the "xml" subtype belongs in the "application" type.
Why are some MIME subtypes prefixed with "x-"?
The "x-" prefix of a MIME subtype simply means that it's non-standard, i.e. not registered with the "Internet Assigned Numbers Authority" (IANA).Why are some MIME subtypes prefixed with "vnd"?
The "vnd" prefix means that the MIME value is vendor specific.How can I set the Content-type header of my files?
It depends on the programming language you are using. Note that most language have a default "Content-type" of "text/html".-
Setting the Content-type in Java:
// Response is of type javax.servlet.ServletReponse
response.setContentType("text/plain"); -
Setting the Content-type in PHP:
<?php header('Content-type: text/html');?>
MIME Types List
@reference_5_stackoverflow
What are all the possible values for HTTP “Content-Type” header?
This is very helpful information for newcomers. Thanks for sharing this great information. I am a gamer and I would like to suggest to you an auto-clicker which is really interesting.
ReplyDeleteAutoclicker
ReplyDeleteWhat a wonderful blog you have writtrn. I like it very much. It's very useful as well as easy to understand. Thanks for this amazing blog. Btw I am gamer and I have something interesting for you. You may Click Here
Hello,
ReplyDeleteThank you for sharing the article and the pictures with us! Most of all I like studies in action.I read very often that it can be helpful I have some thing you like it check here