互联网媒体类型

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

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

媒体类型列表 [编辑]

IANA维护着一个媒体类型和字符编码的记录列表。他们的列表通过互联网向公众开放。一些比较常用的在以下列表当中:

  • Type application: Multipurpose files
    • application/EDI-X12: EDI X12 data; Defined in RFC 1767
    • application/EDIFACT: EDI EDIFACT data; Defined in RFC 1767
    • application/javascript: JavaScript; Defined in RFC 4329
    • application/octet-stream: Arbitrary byte stream. This is thought of as the "default" media type used by several operating systems, often used to identify executable files, files of unknown type, or files that should be downloaded in protocols that do not provide a separate "content disposition" header. RFC 2046 specifies this as the fallback for unrecognized subtypes of other types.
    • application/ogg: Ogg, a multimedia bitstream container format; Defined in RFC 3534
    • application/xhtml+xml: XHTML; Defined by RFC 3236
    • application/x-shockwave-flash: Adobe Flash files; Documented in Adobe TechNote tn_4151 and Adobe TechNote tn_16509
    • application/json: JavaScript Object Notation JSON; Defined in RFC 4627
  • Type audio: Audio
    • audio/mpeg: MP3 or other MPEG audio; Defined in RFC 3003
    • audio/x-ms-wma: Windows Media Audio; Documented in Microsoft KB 288102
    • audio/vnd.rn-realaudio: RealAudio; Documented in RealPlayer Customer Support Answer 2559
    • audio/x-wav: WAV audio
  • Type example
  • Type image
    • image/gif: GIF image; Defined in RFC 2045 and RFC 2046
    • image/jpeg: JPEG JFIF image; Defined in RFC 2045 and RFC 2046
    • image/png: Portable Network Graphics; Registered
    • image/tiff: Tag Image File Format; Defined in RFC 3302
    • image/vnd.microsoft.icon: ICO image; Registered
  • Type message
  • Type model: 3D models
  • Type multipart: Archives and other objects made of more than one part
    • multipart/mixed: MIME E-mail; Defined in RFC 2045 and RFC 2046
    • multipart/alternative: MIME E-mail; Defined in RFC 2045 and RFC 2046
    • multipart/related: MIME E-mail; Defined in RFC 2387 and used by MHTML (HTML mail)
  • Type text: Human-readable text and source code
    • text/css: Cascading Style Sheets; Defined in RFC 2318
    • text/html: HTML; Defined in RFC 2854
    • text/javascript (Obsolete): JavaScript; Defined in and obsoleted by RFC 4329 in order to discourage its usage in favor of application/javascript
    • text/plain: Textual data; Defined in RFC 2046 and RFC 3676
    • text/xml: Extensible Markup Language; Defined in RFC 3023
  • Type video: Video
    • video/mpeg: MPEG-1 video with multiplexed audio; Defined in RFC 2045 and RFC 2046
    • video/mp4: MP4 video; Defined in RFC 4337
    • video/quicktime: QuickTime video; Registered
    • video/x-ms-wmv: Windows Media Video; Documented in Microsoft KB 288102

參考文獻 [编辑]

外部连接 [编辑]