Mime Type in IIS

Source: Internet
Author: User
Tags bmp image pkcs7

Mime (Multipurpose Internet Mail Extensions, multi-purpose Internet Mail Extension) is a specification for creating file formats for email exchange, network documents, and other applications on the enterprise network and Internet. Each MIME format contains a mime content type and a subtype indicating the data stored in this file. Each MIME type consists of two parts. The front part is a large data type, such as audio, image, and so on. The latter part defines a specific type. Mime and child types are generally listed in the form of types/child types, such as the webpage type "text/html ". In HTTP, the MIME type is defined in the Content-Type header. For example, you need to transfer a Microsoft Excel file to the client. The MIME type is "application/vnd. MS-excel ". In most cases, this file is then transmitted to execl for processing (assuming we set execl to an application that handles special MIME types ). In ASP, the method for setting the MIME type is through the contenttype attribute of the response object. In the earliest HTTP protocol, there was no additional data type information. All transmitted data was interpreted by the client program as HTML documents in the hypertext markup language. to support multimedia data types, the MIME data type information appended to the document is used in the HTTP protocol to identify the data type. Mime is an extension of multi-object Internet mail. It is designed to attach multimedia data to an email so that the mail client program can process it based on its type. However, when it is supported by the HTTP protocol, its meaning becomes more significant. It makes HTTP transmitted not only plain text, but also rich and colorful. Common mime-type hypertext markup language text .html, .html text/html plain 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 file 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 Internet has a dedicated organization IANA to confirm the standard MIME type, The Internet is growing too fast, and many applications cannot wait for IANA to confirm that the MIME type they use is of the standard type. Therefore, they use methods starting with X-in the category to identify this category, such as X-gzip and X-tar. In fact, these types are widely used and have become the de facto standard. As long as the client and server acknowledge this mime type together, even if it is not a standard type, the client program can process data according to the MIME type. In web servers and browsers (including operating systems), standard and common MIME types are set by default, the server and client browser must be set for identification. Because the MIME type is related to the document suffix, the server uses the document suffix to distinguish the MIME types of different files. The server must define the correspondence between the document suffix and the MIME type. When a customer program receives data from the server, it only accepts data streams from the server and does not know the document name. Therefore, the server must use additional information to tell the customer program the MIME type of data. Before the server sends real data, it must first send the MIME type information of the Flag data. This information is defined using the Content-Type keyword. For example, for HTML documents, the server will first send the following two lines of mime identification information, which is not part of a real data file. MIME format in IIS. The following table lists mime content types sorted by mime content type/child type: application/envoyevy application/fractalsfif application/futuresplashspl application/htahta application/Internet-property-streamacx application/mac-binhex40hqx application/msworddoc application/msworddot application/octet-stream * application/octet-streambin Application /octet-streamclass application/octet-streamdms application/octet-streamexe application/octet-streamlha application/octet-streamlzh application/odaoda application/olescriptaxs application/export PDF application/pics-rulesprf application/ pkcs10p10 application/pkix-crlcrl application/postscriptai application/postscripteps application/postscriptps application/rtfrtf application/set-payment-initiationsetpay application/set-registration-initiationsetreg application/vnd. MS-excelxla application/vnd. MS-excelxlc application/vnd. MS-excelxlm application/vnd. MS-excelxls application/vnd. MS-excelxlt application/vnd. MS-excelxlw application/vnd. MS-pkicertstoresst application/vnd. MS-pkiseccatcat application/vnd. MS-pkistlstl application/vnd. MS-powerpointpot, application/vnd. MS-powerpointpps application/vnd. MS-powerpointppt application/vnd. MS-projectmpp application/vnd. MS-workswcm application/vnd. MS-workswdb application/vnd. MS-workswks application/vnd. MS-workswps application/winhlphlp application/X-bcpiobcpio application/X-cdfcdf application/X-compressz application/X-compressedtgz application/X-cpiocpio application/X-cshcsh application/X- directordcr application/X-directordir application/X-directordxr application/X-dvidvi application/X-gtargtar application/X-gzipgz application/X-hdfhdf application/X-Internet-signupins application/ x-Internet-signupisp application/X-iphoneiii application/X-javascriptjs application/X-latexlatex application/X-msaccessmdb application/X-mscardfilecrd application/X-msclipclp application/X-msdownloaddll application/x-msmediaviewm13 application/x-msmediaviewm14 application/X-msmediaviewmvb application/X-example application/X-msmoneymny application/X-mspublisherpub application/X-msschedulescd application/X-msterminaltrm application/X- mswritewri application/X-netcdfcdf application/X-netcdfnc application/X-perfmonpma application/X-perfmonpmc application/X-perfmonpml application/X-perfmonpmr application/X-perfmonpmw application/x-pkcs12p12 Application /x-pkcs12pfx application/x-pkcs7-certificatesp7b application/x-pkcs7-certificatesspc application/x-pkcs7-certreqrespp7r application/x-pkcs7-mimep7c application/x-pkcs7-mimep7m application/x-pkcs7-signaturep7s application/X-SHSH application/X-sharshar application/X-stuffitsit application/x-sv4cpiosv4cpio application/ x-sv4crcsv4crc application/X-Tartar application/X-tcltcl application/X-textex application/X-texinfotexi application/X-texinfotexinfo application/X-troffroff application/X-trofft application/X- trofftr applications/X-troff-manman application/X-troff-meme application/X-troff-msms application/X-ustarustar application/X-WAIS-sourcesrc application/x-x509-ca-certcer application/x-x509-ca-certcrt application/x-x509-ca-certder application/ynd. MS-messaging application/zipzip audio/basicau audio/basicsnd audio/midmid audio/midrmi audio/mpegmp3 audio/X-aiffaif audio/X-aiffaifc audio/X-aiffaiff audio/x-mpegurlm3u /X-PN-realaudiora audio/X-PN-realaudioram audio/X-wavwav image/BMP image/cis-codcod image/gifgif image/iefief image/unzip jpe image/unzip JPEG image/ export jpg image/pipegjfif image/export TIF image/export TIFF image/X-CMU-rasterras image/X-cmxcmx image/X-iconico image/X-portable-anymappnm image/X-portable- bitmappbm image/X-portable-graymappgm image/X-portable-pixmapppm image/X-rgbrgb image/X-xbitmapxbm image/X-xpixmapxpm image/X-xwindowdumpxwd message/rfc822mht message/ plain message/plain text/csscss text/h323323 text/htmlhtm text/htmlhtml text/htmlstm text/iulsuls text/plainbas text/plainc text/plainh text/plaintxt text/richtextrtx text/scriptletsct text/TAB-separated-valuestsv text/webviewhtmlhtt text/X-componenthtc text/X-setextetx text/X-vcardvcf video/mpegmp2 video/mpegmpa video/mpegmpe video/mpegmpeg video/mpegmpg video/mpegmpv2 video/quicktimemov video/quicktimeqt video/X-la-asflsf video/X-la-asflsx video/X-MS-asfasf video/X-MS-asfasr video/x -MS-asfasx video/X-msvideoavi video/X-SGI-moviemovie X-World/X-vrmlflr X-World/X-vrmlvrml X-World/X-vrmlwrl X-world /X-vrmlwrz X-World/X-vrmlxaf X-World/X-vrmlxof

 

============================

 

The MIME type is the type used by an application to open a file with a certain extension. When a file with the extension is accessed, the browser automatically opens the file with the specified application. It is used to specify custom client file names and open media files.

The full name of mime is "Multipurpose Internet email extension", which is a multi-purpose Internet Mail extended protocol. It was first used in the email system in 1992, but later used in browsers. The server will tell the browser the type of multimedia data they send, and the notification means to indicate the MIME type of the multimedia data, so that the browser can know the received information which is MP3 files, which are shockwave files. The server puts the mime token into the transmitted data to tell the browser which plug-in is used to read the relevant file.

After the browser receives the file, it will go to the plug-in system to find out which plug-in can identify and read the received file. If the browser does not know which plug-in system to call, it may tell the user that a plug-in is missing, or directly select an existing plug-in to try to read the received file, the latter may cause a system crash. The absence of mime identifiers in the transmitted information may make it difficult to estimate the situation, because some computer systems may not have any faults, but some computers may crash.

To check whether a server correctly sets the MIME type, follow these steps:

1. Open the server webpage in the Netscape Browser

2. Go to the "View" menu and select "Page Info"

3. Click "embed" in the upper-layer framework in the pop-up window"

4. check whether the MIME type is "application/X-director" or "application/X-Shockwave-flash" in the lower-layer framework ", if the above information is used, it indicates that the server has correctly set the MIME type; if the MIME type lists text content, eight-bit data, or other forms, it indicates that the server's MIME type is not set correctly.

If the server does not correctly indicate the type of data it sends, the server administrator should correctly add relevant information. The specific operation method is very simple and quick.

Microsoft uses ActiveX controls instead of Netscape plug-ins in Windows browsers, which do not rely on mime encoding as other browsers do. The "CLSID" attribute of the "object" tag accurately identifies the program to be called to read the received file. Therefore, the browser does not have to select a reader like the "embed" tag. Because of this, you will often encounter mime problems when using a browser with plug-ins, while browsers using ActiveX controls rarely have such troubles.

Because of the differences in the above work methods, I wonder if you find that when you use the Netscape Browser to play wav files, the browser will call the liveconnect plug-in for playback, other browsers generally use the general QuickTime playback plug-in to play the video. This is because the Netscape Browser needs to read the mime identifier to receive the file, so as to decide which program to call to read the received file, the liveconnect plug-in should be used for server settings to play wav files in the Netscape browser. Therefore, when the Netscape Browser receives files in WAV format, it must call the liveconnect plug-in, however, because other browsers do not use this method, they all use the default player for playing wav files. Of course, flash movie files do not have this problem, because only Flash players can correctly read files in this format.

When sending the output result to a browser, the browser must start an appropriate application to process the output document. This can be done through multiple types of mime (multi-function Internet Mail Extension protocol. In HTTP, the MIME type is defined in the Content-Type header.

For example, suppose you want to transfer a Microsoft Excel file to the client. The MIME type is "application/vnd. MS-excel ". In most cases, this file is then transmitted to execl for processing (assuming we set execl to an application that handles special MIME types ). In ASP, the method for setting the MIME type is through the contenttype attribute of the response object.

Multimedia file format MIME

In the earliest HTTP protocol, there was no additional data type information. All transmitted data was interpreted by the client program as HTML documents in the hypertext markup language. to support multimedia data types, the MIME data type information appended to the document is used in the HTTP protocol to identify the data type.

Mime is an extension of multi-object Internet mail. It is designed to attach multimedia data to an email so that the mail client program can process it based on its type. However, when it is supported by the HTTP protocol, its meaning becomes more significant. It makes HTTP transmitted not only plain text, but also rich and colorful.

Each MIME type consists of two parts. The front part is a large data type, such as audio, image, and so on. The latter part defines a specific type.

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 sound 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

There is a dedicated IANA organization in the Internet to confirm the standard MIME type, but the Internet is growing too fast, and many applications cannot wait for IANA to confirm that they are using the standard MIME type. Therefore, they use methods starting with X-in the category to identify this category, such as X-gzip and X-tar. In fact, these types are widely used and have become the de facto standard. As long as the client and server acknowledge this mime type together, even if it is not a standard type, the client program can process data according to the MIME type. In web servers and browsers (including operating systems), standard and common MIME types are set by default, the server and client browser must be set for identification.

Because the MIME type is related to the document suffix, the server uses the document suffix to distinguish the MIME types of different files. The server must define the correspondence between the document suffix and the MIME type. When a customer program receives data from the server, it only accepts data streams from the server and does not know the document name. Therefore, the server must use additional information to tell the customer program the MIME type of data. Before the server sends real data, it must first send the MIME type information of the Flag data. This information is defined using the Content-Type keyword. For example, for HTML documents, the server will first send the following two lines of mime identification information, which is not part of a real data file.

Content-Type: text/html

Note that the second act is a blank line, which is required to separate the mime information from the real data content.

 

================================

List of Registered mime media types in IANA

Http://zh.wikipedia.org/wiki/MIME

Http://www.iana.org/assignments/media-types/

Http://www.iana.org

 

Http://www.cnnic.cn/

Http://www.icann.org/

 

Http://www.w3.org/

Http://www.ecmascript.org/about.php

Http://weblogs.asp.net/scottgu/default.aspx

Http://www.acidtests.org/

Http://www.iso.org

Http://www.iec.ch/

Http://www.standardsinfo.net/info/livelink/fetch/2000/148478/6301438/index.html

Http://www.ecma-international.org/memento/TC39.htm

 

Http://www.asp.net/

Http://msdn.microsoft.com/zh-cn/default.aspx

Http://www.infoq.com/

Http://www.cnet.com/

 

Http://webkit.org/

Http://zh.wikipedia.org/wiki/WebKit

 

Http://ftp.mozilla.org/pub/mozilla.org/firefox/

 

Http://www.mozilla.org/

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.