Can someone explain to me what's the difference between Content-Type and the MIME Type? I can't find a clear answer on the net.
If Content-Type usually used inside the Browser. And MIME type is used by the os?
Can someone explain to me what's the difference between Content-Type and the MIME Type? I can't find a clear answer on the net.
If Content-Type usually used inside the Browser. And MIME type is used by the os?
In Content-Type=text/plain
, Content-Type is a MIME header, text/plain is MIME Type.
Here are more MIME Headers (https://msdn.microsoft.com/en-us/library/ms526943(v=exchg.10).aspx):
MIME-Version
Content-Type
Content-Transfer-Encoding
Content-ID
Content-Description
Content-Disposition
Here are more MIME Types (https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types. ):
text/plain
text/html
image/jpeg
image/png
audio/mpeg
audio/ogg
audio/*
video/mp4
More, you can specify an encoding for Content-Type
text/html; charset=UTF-8
The Content-Type indicates the media type, where media types are defined as MIME types.
The "Content-Type" header field indicates the media type of the associated representation: [...] Content-Type = media-type
HTTP uses Internet media types [RFC2046] in the Content-Type (Section 3.1.1.5) and Accept (Section 5.3.2) header fields in order to provide open and extensible data typing and type negotiation.
Where RFC 2046 specifies MIME Types.
MIME (Multipurpose Internet Mail Extensions)
MIME was originally designed to solve problems encountered in moving messages between different electronic mail systems.
Content-type
Header value defined in a HTTP response, the browser can open the file with the proper extension/plugin.
Example:Content-type: image/jpeg
This format is inspired form MIME format.
Content-type: main_mime_type(image)/mime_subtype(jpeg)
or HTTP adopted it to describe and label its own multimedia content.
Outside from question: MIME sniffing:-is used by some web browsers, in an attempt to help web sites which do not correctly signal the MIME type of web content display.