本页使用了标题或全文手工转换

互联网媒体类型

维基百科,自由的百科全书
跳转至: 导航搜索

互联网媒体类型(Internet media type),原名叫“Type MIME”或“MIME”或在头信息中各种协议之后的内容种类(Content-type),他有两部分用来在Internet上鉴别数据格式。鉴别方法已经在RFC 2046中定义,使用在电子邮件通过SMTP。但是他已经被扩展到其他的协议当中,比如:HTTP或者SIP。 一个Type MIME至少包括两个部分:一个类型和一个子类型和一个或多个其他需要的参数。比如,一个子类型text有一个可选参数charset用来表明字符编码;或者一个multipart类型的子类型定义了一个选项boundary。 那些类型和子类型都以“x-”开头的是不标准的,他们不能被存储如果应用IANA。那些子类型以“vnd”开头的是商家信息。

格式:
[type]/[subtype]

媒体类型列表[编辑]

IANA维护着一个媒体类型和字符编码的记录列表。他们的列表通过互联网向公众开放。

Type application[编辑]

分別對於不同用途的檔案:

  • application/atom+xmlAtom feeds
  • application/ecmascriptECMAScript/JavaScript;[1](相當於application/javascript但是嚴格的處理規則)
  • application/EDI-X12EDI ANSI ASC X12英语ANSI ASC X12資料[2]
  • application/EDIFACTEDI EDIFACT資料[2]
  • application/jsonJSON(JavaScript Object Notation)[3]
  • application/javascriptECMAScript/JavaScript[1](相當於application/ecmascript但是寬鬆的處理規則)它不被IE 8或更早之前的版本所支援。雖然可以改用text/javascript,但它卻被RFC 4329定義為過時。在HTML5之中,<script>標籤的type的屬性是可省略的,因為所有的瀏覽器即使在HTML5以前都一直預設使用JavaScript。
  • application/octet-stream:任意的二進制檔案(通常做為通知瀏覽器下載檔案)[4] Generally speaking this type identifies files that are not associated with a specific application. Contrary to past assumptions by software packages such as Apache this is not a type that should be applied to unknown files. In such a case, a server or application should not indicate a content type, as it may be incorrect, but rather, should omit the type in order to allow the recipient to guess the type.[5]
  • application/oggOgg, 视频文件格式[6]
  • application/pdfPDF(Portable Document Format)[7]
  • application/postscriptPostScript[4]
  • application/rdf+xmlResource Description Framework[8]
  • application/rss+xmlRSS feeds
  • application/soap+xmlSOAP[9]
  • application/font-woffWeb Open Font Format;(推薦使用;使用application/x-font-woff直到它變為官方標準)
  • application/xhtml+xmlXHTML[10]
  • application/xmlXML檔案[11]
  • application/xml-dtdDTD檔案[11]
  • application/xop+xmlXML-binary Optimized Packaging英语XML-binary Optimized Packaging[12]
  • application/zipZIP壓縮檔[13]
  • application/gzipGzip[14]

Type audio[编辑]

數位音訊檔案:

Type image[编辑]

圖檔:

Type message[编辑]

Type model[编辑]

三维计算机图形檔案:

Type multipart[编辑]

Type text[编辑]

  • text/cssCSS檔案[26]
  • text/csvCSV檔案[27]
  • text/htmlHTML檔案[28]
  • text/javascript (過時): JavaScript; Defined in and obsoleted by RFC 4329 in order to discourage its usage in favor of application/javascript. However, text/javascript is allowed in HTML 4 and 5 and, unlike application/javascript, has cross-browser support. The "type" attribute of the <script> tag in HTML5 is optional and there is no need to use it at all since all browsers have always assumed the correct default (even in HTML 4 where it was required by the specification).
  • text/plain:純文字內容[29]
  • text/vcardvCard(電子名)[30]
  • text/xmlXML[11]

Type video[编辑]

视频文件格式檔案(可能包含数字视频數位音訊):

媒体子类型列表[编辑]

vnd前置[编辑]

x前置[编辑]

x-pkcs前置[编辑]

參考文獻[编辑]

  1. ^ 1.0 1.1 RFC 4329 - Scripting Media Types
  2. ^ 2.0 2.1 RFC 1767 - MIME Encapsulation of EDI Objects
  3. ^ RFC 4627 -The application/json Media Type for JavaScript Object Notation(JSON)
  4. ^ 4.0 4.1 RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media types
  5. ^ W3C. RFC 2616: 7. Entity. Hypertext Transfer Protocol -- HTTP/1.1. The Internet Society. 1999-06 [28 May 2012]. 
  6. ^ 6.0 6.1 6.2 RFC 5334 - Ogg Media Types
  7. ^ RFC 3778 - The application/pdf Media Type
  8. ^ RFC 3870 - application/rdf+xml Media Type Registration
  9. ^ RFC 3902 - The "application/soap+xml" media type
  10. ^ RFC 3236 - The 'application/xhtml+xml' Media Type
  11. ^ 11.0 11.1 11.2 RFC 3023 - XML Media Types
  12. ^ XML-binary Optimized Packaging
  13. ^ MIME SUBTYPE NAME: zip
  14. ^ RFC 6713 - The 'application/zlib' and 'application/gzip' Media Types
  15. ^ RFC 4337 -MIME Type Registration for MPEG-4
  16. ^ RFC 3003 - The audio/mpeg Media Type
  17. ^ RFC 5215 - RTP Payload Format for Vorbis Encoded Audio
  18. ^ Supported Media Formats. RealPlayer Help. RealNetworks. 2010 [28 May 2012]. 
  19. ^ RFC 2361 - WAVE and AVI Codec Registries
  20. ^ 20.0 20.1 RFC 2045, RFC 2046 - Multipurpose Internet Mail Extensions (MIME), parts 1 and 2
  21. ^ RFC 2083 - PNG (Portable Network Graphics) Specification - Version 1.0
  22. ^ SVG Tiny 1.2 Specification Appendix M
  23. ^ RFC 3302 - Tag Image File Format (TIFF) - image/tiff MIME Sub-type Registration
  24. ^ RFC 4735 - Example Media Types for Use in Documentation
  25. ^ 25.0 25.1 25.2 RFC 2077 - The Model Primary Content Type for Multipurpose Internet Mail Extensions
  26. ^ RFC 2318 - The text/css Media Type
  27. ^ RFC 4180 - Common Format and MIME Type for Comma-Separated Values (CSV) Files
  28. ^ RFC 2854 - The 'text/html' Media Type
  29. ^ RFC 2046RFC 3676
  30. ^ RFC 6350 - vCard Format Specification
  31. ^ RFC 2045RFC 2046
  32. ^ RFC 4337 - MIME Type Registration for MPEG-4
  33. ^ Quicktime
  34. ^ Microsoft KB 288102

相關[编辑]

外部连接[编辑]