MIME (Multipurpose Internet Mail Extensions,多功能Internet郵件擴展)是創(chuàng )建用于電子郵件交換,網(wǎng)絡(luò )文檔,及企業(yè)網(wǎng)和Internet上的其他應用程序中的文件格式的規范。每個(gè)MIME格式包含一個(gè)MIME內容類(lèi)型("MIME type")和指示存儲在這個(gè)文件中的數據的子類(lèi)型。MIME類(lèi)型和子類(lèi)型一般以類(lèi)型/子類(lèi)型的形式列出。例如,一個(gè)MPEG視頻文件將會(huì )以"video/mpeg"的形式列出。MIME類(lèi)型/子類(lèi)型列表包括可接受的文件名擴展名。例如,列出一個(gè)MPEG文件的MIME信息的表格可能包含如下的一個(gè)MPEG條目:
| 類(lèi)型/子類(lèi)型 | 擴展名 |
| video/mpeg | .mpe, .mpeg, .mpg |
MIME格式的內容廣泛用于網(wǎng)絡(luò )文檔中。例如,你可以將一個(gè)MPEG文件連接到一個(gè)網(wǎng)頁(yè)上。當用戶(hù)瀏覽這個(gè)網(wǎng)頁(yè)單擊這個(gè)MPEG文件連接時(shí),當下載這個(gè)MPEG 文件到這個(gè)瀏覽器顯示時(shí),IIS和Microsoft® Internet Explorer瀏覽器執行下面的事件序列:
IIS包含一個(gè)最通用的基于網(wǎng)絡(luò )的mime類(lèi)型和子類(lèi)型及相關(guān)聯(lián)的文件名擴展名的一個(gè)表格。如果IIS沒(méi)有你下載的這個(gè)MIME格式文件的MIME信息,那么IIS將向這個(gè)文件附加一個(gè)缺省的MIME身份。結果,這個(gè)接收文件的客戶(hù)可能會(huì )誤解它的內容。你可以為身份不在表格中的文件向IIS手動(dòng)加入MIME類(lèi)型,子類(lèi)型和文件名擴展名。見(jiàn)關(guān)于加入用于你的IIS版本的MIME類(lèi)型的部分。 注意,當計劃使用一個(gè)MIME格式時(shí),你必須為助手程序配置瀏覽器來(lái)處理這個(gè)瀏覽器不能直接支持的所有MIME類(lèi)型。 使用MIME表格 這個(gè)參考包含同一個(gè)MIME表格的兩個(gè)版本:
如果你有一個(gè)MIME擴展名,并想找到這個(gè)被IIS 4.0或 IIS 5.0使用的MIME類(lèi)型/子類(lèi)型,請在第一個(gè)標各種查找,"IIS中的MIME格式,按擴展名排序." 如果你有一個(gè)MIME類(lèi)型/子類(lèi)型,并且想要弄清楚它是否在IIS 4.0 或IIS 5.0注冊了,請察看第二個(gè)表格,"IIS中的MIME格式,按類(lèi)型/子類(lèi)型排序"。這個(gè)表格也可以用于用于給定MIME類(lèi)型/子類(lèi)型的一個(gè)文件擴展名。 向IIS 4.0加入MIME類(lèi)型 MIME類(lèi)型可以利用Internet服務(wù)管理器控制臺在IIS 4.0中注冊。 例如,為了利用Internet服務(wù)管理器加入XML MIME類(lèi)型:
任何其他擴展名,如.xsl(eXtensible Style Sheets),可以采取同樣的過(guò)程加入。 向IIS 5.0加入MIME類(lèi)型 MIME類(lèi)型可以利用IIS snap-in在IIS 5.0中注冊。 例如,為了利用IIS snap-in向缺省的得網(wǎng)站加入XML MIME類(lèi)型:
為了向所有在給定機器上運行的站點(diǎn)加入XML MIME類(lèi)型:
任何其他擴展名,如.xsl (eXtensible Style Sheets),可以采用同樣的過(guò)程加入。 在A(yíng)SP頁(yè)聲明一個(gè)MIME類(lèi)型 當網(wǎng)絡(luò )服務(wù)器向一個(gè)瀏覽器返回一個(gè)文件時(shí),它發(fā)送確定返回內容的類(lèi)型的信息。當ASP應用程序要產(chǎn)生不只是HTML的內容時(shí),它必須利用Response對象的ContentType屬性聲明一個(gè)MIME類(lèi)型/子類(lèi)型。 例如,當利用ASP動(dòng)態(tài)產(chǎn)生XML時(shí),XML MIME類(lèi)型/子類(lèi)型必須在這個(gè)ASP本身聲明。利用Response對象的ContentType屬性,指示輸出是XML,代碼如下: IIS中的MIME格式,按擴展名排序 下面的表格列出了按文件擴展名排序的MIME內容類(lèi)型,這些類(lèi)型是在IIS 4.0 和IIS 5.0中注冊的。
| 擴展名 | 類(lèi)型/子類(lèi)型 | IIS 4.0 | IIS 5.0 |
| * | application/octet-stream | 是 | 是 |
| 323 | text/h323 | 否 | 是 |
| acx | application/internet-property-stream | 否 | 是 |
| ai | application/postscript | 是 | 是 |
| aif | audio/x-aiff | 是 | 是 |
| aifc | audio/x-aiff | 是 | 是 |
| aiff | audio/x-aiff | 是 | 是 |
| asf | video/x-ms-asf | 否 | 是 |
| asr | video/x-ms-asf | 否 | 是 |
| asx | video/x-ms-asf | 否 | 是 |
| au | audio/basic | 是 | 是 |
| avi | video/x-msvideo | 是 | 是 |
| axs | application/olescript | 否 | 是 |
| bas | text/plain | 是 | 是 |
| bcpio | application/x-bcpio | 是 | 是 |
| bin | application/octet-stream | 是 | 是 |
| bmp | image/bmp | 是 | 是 |
| c | text/plain | 是 | 是 |
| cat | application/vnd.ms-pkiseccat | 否 | 是 |
| cdf | application/x-cdf | 否 | 是 |
| cer | application/x-x509-ca-cert | 否 | 是 |
| class | application/octet-stream | 是 | 是 |
| clp | application/x-msclip | 是 | 是 |
| cmx | image/x-cmx | 是 | 是 |
| cod | image/cis-cod | 是 | 是 |
| cpio | application/x-cpio | 是 | 是 |
| crd | application/x-mscardfile | 是 | 是 |
| crl | application/pkix-crl | 否 | 是 |
| crt | application/x-x509-ca-cert | 否 | 是 |
| csh | application/x-csh | 是 | 是 |
| css | text/css | 否 | 是 |
| dcr | application/x-director | 是 | 是 |
| der | application/x-x509-ca-cert | 否 | 是 |
| dir | application/x-director | 是 | 是 |
| dll | application/x-msdownload | 否 | 是 |
| dms | application/octet-stream | 是 | 是 |
| doc | application/msword | 是 | 是 |
| dot | application/msword | 是 | 是 |
| dvi | application/x-dvi | 是 | 是 |
| dxr | application/x-director | 是 | 是 |
| eps | application/postscript | 是 | 是 |
| etx | text/x-setext | 是 | 是 |
| evy | application/envoy | 是 | 是 |
| exe | application/octet-stream | 是 | 是 |
| fif | application/fractals | 否 | 是 |
| flr | x-world/x-vrml | 是 | 是 |
| gif | image/gif | 是 | 是 |
| gtar | application/x-gtar | 是 | 是 |
| gz | application/x-gzip | 否 | 是 |
| h | text/plain | 是 | 是 |
| hdf | application/x-hdf | 是 | 是 |
| hlp | application/winhlp | 是 | 是 |
| hqx | application/mac-binhex40 | 是 | 是 |
| hta | application/hta | 否 | 是 |
| htc | text/x-component | 否 | 是 |
| htm | text/html | 是 | 是 |
| html | text/html | 是 | 是 |
| htt | text/webviewhtml | 否 | 是 |
| ico | image/x-icon | 否 | 是 |
| ief | image/ief | 是 | 是 |
| iii | application/x-iphone | 否 | 是 |
| ins | application/x-internet-signup | 否 | 是 |
| isp | application/x-internet-signup | 否 | 是 |
| jfif | image/pipeg | 否 | 是 |
| jpe | image/jpeg | 是 | 是 |
| jpeg | image/jpeg | 是 | 是 |
| jpg | image/jpeg | 是 | 是 |
| js | application/x-javascript | 是 | 是 |
| latex | application/x-latex | 是 | 是 |
| lha | application/octet-stream | 是 | 是 |
| lsf | video/x-la-asf | 否 | 是 |
| lsx | video/x-la-asf | 否 | 是 |
| lzh | application/octet-stream | 是 | 是 |
| m13 | application/x-msmediaview | 是 | 是 |
| m14 | application/x-msmediaview | 是 | 是 |
| m3u | audio/x-mpegurl | 否 | 是 |
| man | application/x-troff-man | 是 | 是 |
| mdb | application/x-msaccess | 是 | 是 |
| me | application/x-troff-me | 是 | 是 |
| mht | message/rfc822 | 否 | 是 |
| mhtml | message/rfc822 | 否 | 是 |
| mid | audio/mid | 否 | 是 |
| mny | application/x-msmoney | 是 | 是 |
| mov | video/quicktime | 是 | 是 |
| movie | video/x-sgi-movie | 是 | 是 |
| mp2 | video/mpeg | 是 | 是 |
| mp3 | audio/mpeg | 否 | 是 |
| mpa | video/mpeg | 是 | 是 |
| mpe | video/mpeg | 是 | 是 |
| mpeg | video/mpeg | 是 | 是 |
| mpg | video/mpeg | 是 | 是 |
| mpp | application/vnd.ms-project | 是 | 是 |
| mpv2 | video/mpeg | 是 | 是 |
| ms | application/x-troff-ms | 是 | 是 |
| mvb | application/x-msmediaview | 是 | 是 |
| nws | message/rfc822 | 否 | 是 |
| oda | application/oda | 是 | 是 |
| p10 | application/pkcs10 | 否 | 是 |
| p12 | application/x-pkcs12 | 否 | 是 |
| p7b | application/x-pkcs7-certificates | 否 | 是 |
| p7c | application/x-pkcs7-mime | 否 | 是 |
| p7m | application/x-pkcs7-mime | 否 | 是 |
| p7r | application/x-pkcs7-certreqresp | 否 | 是 |
| p7s | application/x-pkcs7-signature | 否 | 是 |
| pbm | image/x-portable-bitmap | 是 | 是 |
| application/pdf | 是 | 是 | |
| pfx | application/x-pkcs12 | 否 | 是 |
| pgm | image/x-portable-graymap | 是 | 是 |
| pko | application/ynd.ms-pkipko | 否 | 是 |
| pma | application/x-perfmon | 是 | 是 |
| pmc | application/x-perfmon | 是 | 是 |
| pml | application/x-perfmon | 是 | 是 |
| pmr | application/x-perfmon | 是 | 是 |
| pmw | application/x-perfmon | 是 | 是 |
| pnm | image/x-portable-anymap | 是 | 是 |
| pot, | application/vnd.ms-powerpoint | 是 | 是 |
| ppm | image/x-portable-pixmap | 是 | 是 |
| pps | application/vnd.ms-powerpoint | 是 | 是 |
| ppt | application/vnd.ms-powerpoint | 是 | 是 |
| prf | application/pics-rules | 否 | 是 |
| ps | application/postscript | 是 | 是 |
| pub | application/x-mspublisher | 是 | 是 |
| qt | video/quicktime | 是 | 是 |
| ra | audio/x-pn-realaudio | 是 | 是 |
| ram | audio/x-pn-realaudio | 是 | 是 |
| ras | image/x-cmu-raster | 是 | 是 |
| rgb | image/x-rgb | 是 | 是 |
| rmi | audio/mid | 否 | 是 |
| roff | application/x-troff | 是 | 是 |
| rtf | application/rtf | 是 | 是 |
| rtx | text/richtext | 是 | 是 |
| scd | application/x-msschedule | 是 | 是 |
| sct | text/scriptlet | 否 | 是 |
| setpay | application/set-payment-initiation | 否 | 是 |
| setreg | application/set-registration-initiation | 否 | 是 |
| sh | application/x-sh | 是 | 是 |
| shar | application/x-shar | 是 | 是 |
| sit | application/x-stuffit | 否 | 是 |
| snd | audio/basic | 是 | 是 |
| spc | application/x-pkcs7-certificates | 否 | 是 |
| spl | application/futuresplash | 否 | 是 |
| src | application/x-wais-source | 是 | 是 |
| sst | application/vnd.ms-pkicertstore | 否 | 是 |
| stl | application/vnd.ms-pkistl | 否 | 是 |
| stm | text/html | 是 | 是 |
| sv4cpio | application/x-sv4cpio | 是 | 是 |
| sv4crc | application/x-sv4crc | 是 | 是 |
| t | application/x-troff | 是 | 是 |
| tar | application/x-tar | 是 | 是 |
| tcl | application/x-tcl | 是 | 是 |
| tex | application/x-tex | 是 | 是 |
| texi | application/x-texinfo | 是 | 是 |
| texinfo | application/x-texinfo | 是 | 是 |
| tgz | application/x-compressed | 否 | 是 |
| tif | image/tiff | 是 | 是 |
| tiff | image/tiff | 是 | 是 |
| tr | application/x-troff | 是 | 是 |
| trm | application/x-msterminal | 是 | 是 |
| tsv | text/tab-separated-values | 是 | 是 |
| txt | text/plain | 是 | 是 |
| uls | text/iuls | 否 | 是 |
| ustar | application/x-ustar | 是 | 是 |
| vcf | text/x-vcard | 否 | 是 |
| vrml | x-world/x-vrml | 是 | 是 |
| wav | audio/x-wav | 是 | 是 |
| wcm | application/vnd.ms-works | 是 | 是 |
| wdb | application/vnd.ms-works | 是 | 是 |
| wks | application/vnd.ms-works | 是 | 是 |
| wmf | application/x-msmetafile | 是 | 是 |
| wps | application/vnd.ms-works | 是 | 是 |
| wri | application/x-mswrite | 是 | 是 |
| wrl | x-world/x-vrml | 是 | 是 |
| wrz | x-world/x-vrml | 是 | 是 |
| xaf | x-world/x-vrml | 是 | 是 |
| xbm | image/x-xbitmap | 是 | 是 |
| xla | application/vnd.ms-excel | 是 | 是 |
| xlc | application/vnd.ms-excel | 是 | 是 |
| xlm | application/vnd.ms-excel | 是 | 是 |
| xls | application/vnd.ms-excel | 是 | 是 |
| xlt | application/vnd.ms-excel | 是 | 是 |
| xlw | application/vnd.ms-excel | 是 | 是 |
| xof | x-world/x-vrml | 是 | 是 |
| xpm | image/x-xpixmap | 是 | 是 |
| xwd | image/x-xwindowdump | 是 | 是 |
| z | application/x-compress | 否 | 是 |
| zip | application/zip | 是 | 是 |
IIS中的MIME格式,按類(lèi)型/子類(lèi)型排序 下面的表格列出了按MIME內容類(lèi)型/子類(lèi)型排序的MIME內容類(lèi)型,這些類(lèi)型是在IIS 4.0 和IIS 5.0中注冊的。
| 類(lèi)型/子類(lèi)型 | 擴展名 | IIS 4.0 | IIS 5.0 |
| application/envoy | evy | 是 | 是 |
| application/fractals | fif | 否 | 是 |
| application/futuresplash | spl | 否 | 是 |
| application/hta | hta | 否 | 是 |
| application/internet-property-stream | acx | 否 | 是 |
| application/mac-binhex40 | hqx | 是 | 是 |
| application/msword | doc | 是 | 是 |
| application/msword | dot | 是 | 是 |
| application/octet-stream | * | 是 | 是 |
| application/octet-stream | bin | 是 | 是 |
| application/octet-stream | class | 是 | 是 |
| application/octet-stream | dms | 是 | 是 |
| application/octet-stream | exe | 是 | 是 |
| application/octet-stream | lha | 是 | 是 |
| application/octet-stream | lzh | 是 | 是 |
| application/oda | oda | 是 | 是 |
| application/olescript | axs | 否 | 是 |
| application/pdf | 是 | 是 | |
| application/pics-rules | prf | 否 | 是 |
| application/pkcs10 | p10 | 否 | 是 |
| application/pkix-crl | crl | 否 | 是 |
| application/postscript | ai | 是 | 是 |
| application/postscript | eps | 是 | 是 |
| application/postscript | ps | 是 | 是 |
| application/rtf | rtf | 是 | 是 |
| application/set-payment-initiation | setpay | 否 | 是 |
| application/set-registration-initiation | setreg | 否 | 是 |
| application/vnd.ms-excel | xla | 是 | 是 |
| application/vnd.ms-excel | xlc | 是 | 是 |
| application/vnd.ms-excel | xlm | 是 | 是 |
| application/vnd.ms-excel | xls | 是 | 是 |
| application/vnd.ms-excel | xlt | 是 | 是 |
| application/vnd.ms-excel | xlw | 是 | 是 |
聯(lián)系客服