The media Type is usually notified to the browser through the HTTP protocol. More accurately, it is expressed by Content-Type, for example:
Content-Type: text/HTML
Indicates that the content is of the text/HTML type, that is, hypertext File. Why is it "text/HTML" instead of "HTML/text" or something else? MIME Type is not specified by an individual. It is published on the Internet in the form of RFC through the ietf organization negotiation, most Web servers and user proxies support this specification (by the way, the Type of Email attachments is also specified by MIME Type ).
Generally, only some formats that are widely used on the Internet can obtain a MIME Type. If the format is defined by a client, it can only start with application/x.
XHTML is a widely used format. Therefore, in RFC 3236, the MIME Type of the XHTML format file should be application/xHTML + XML.
Of course, when no one tells the browser about the MIME Type of a local file, the browser also performs some default processing, this may be related to the MIME Type you configured for the file in the operating system. For example, in Windows, open the "HKEY_LOCAL_MACHINESOFTWAREClassesMIMEDatabaseContent Type" primary key of the registry, and you can see the configuration information of all MIME types.
Common MIME types
HyperText Markup Language text .html, .html text/html
Common text. txt text/plain
RTF text. rtf application/rtf
GIF image. gif image/gif
JPEG image .ipeg,.jpg image/jpeg
Au audio file. au audio/basic
MIDI music files mid,. midi audio/midi, audio/x-midi
RealAudio music file. ra,. ram audio/x-pn-realaudio
MPEG file. mpg,. mpeg video/mpeg
AVI file. avi video/x-msvideo
GZIP file. gz application/x-gzip
TAR file. tar application/x-tar