diff --git a/files/zh-cn/web/http/basics_of_http/mime_types/common_types/index.md b/files/zh-cn/web/http/basics_of_http/mime_types/common_types/index.md index d1b86dc3b9e45c..9834bd891cd76d 100644 --- a/files/zh-cn/web/http/basics_of_http/mime_types/common_types/index.md +++ b/files/zh-cn/web/http/basics_of_http/mime_types/common_types/index.md @@ -12,73 +12,80 @@ slug: Web/HTTP/Basics_of_HTTP/MIME_types/Common_types - `text/plain` 表示文本文件的默认值。一个文本文件应当是人类可读的,并且不包含二进制数据。 - `application/octet-stream` 表示所有其他情况的默认值。一种未知的文件类型应当使用此类型。浏览器在处理这些文件时会特别小心,试图防止、避免用户的危险行为。 -IANA 是 MIME 媒体类型的官方注册机构,并维护了 [list of all the official MIME types](http://www.iana.org/assignments/media-types/media-types.xhtml)。下面的表格列出了 Web 上的一些重要 MIME 类型: +IANA 是 MIME 媒体类型的官方注册机构,并维护了[官方所有 MIME 类型的列表](https://www.iana.org/assignments/media-types/media-types.xhtml)。下面的表格列出了 Web 上的一些重要 MIME 类型: -| 扩展名 | 文档类型 | MIME 类型 | -| -------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `.aac` | AAC audio | `audio/aac` | -| `.abw` | [AbiWord](https://en.wikipedia.org/wiki/AbiWord) document | `application/x-abiword` | -| `.arc` | Archive document (multiple files embedded) | `application/x-freearc` | -| `.avi` | AVI: Audio Video Interleave | `video/x-msvideo` | -| `.azw` | Amazon Kindle eBook format | `application/vnd.amazon.ebook` | -| `.bin` | Any kind of binary data | `application/octet-stream` | -| `.bmp` | Windows OS/2 Bitmap Graphics | `image/bmp` | -| `.bz` | BZip archive | `application/x-bzip` | -| `.bz2` | BZip2 archive | `application/x-bzip2` | -| `.csh` | C-Shell script | `application/x-csh` | -| `.css` | Cascading Style Sheets (CSS) | `text/css` | -| `.csv` | Comma-separated values (CSV) | `text/csv` | -| `.doc` | Microsoft Word | `application/msword` | -| `.docx` | Microsoft Word (OpenXML) | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` | -| `.eot` | MS Embedded OpenType fonts | `application/vnd.ms-fontobject` | -| `.epub` | Electronic publication (EPUB) | `application/epub+zip` | -| `.gif` | Graphics Interchange Format (GIF) | `image/gif` | -| `.htm .html` | HyperText Markup Language (HTML) | `text/html` | -| `.ico` | Icon format | `image/vnd.microsoft.icon` | -| `.ics` | iCalendar format | `text/calendar` | -| `.jar` | Java Archive (JAR) | `application/java-archive` | -| `.jpeg` `.jpg` | JPEG images | `image/jpeg` | -| `.js` | JavaScript | `text/javascript` | -| `.json` | JSON format | `application/json` | -| `.jsonld` | JSON-LD format | `application/ld+json` | -| `.mid` `.midi` | Musical Instrument Digital Interface (MIDI) | `audio/midi` `audio/x-midi` | -| `.mjs` | JavaScript module | `text/javascript` | -| `.mp3` | MP3 audio | `audio/mpeg` | -| `.mpeg` | MPEG Video | `video/mpeg` | -| `.mpkg` | Apple Installer Package | `application/vnd.apple.installer+xml` | -| `.odp` | OpenDocument presentation document | `application/vnd.oasis.opendocument.presentation` | -| `.ods` | OpenDocument spreadsheet document | `application/vnd.oasis.opendocument.spreadsheet` | -| `.odt` | OpenDocument text document | `application/vnd.oasis.opendocument.text` | -| `.oga` | OGG audio | `audio/ogg` | -| `.ogv` | OGG video | `video/ogg` | -| `.ogx` | OGG | `application/ogg` | -| `.otf` | OpenType font | `font/otf` | -| `.png` | Portable Network Graphics | `image/png` | -| `.pdf` | Adobe [Portable Document Format](https://acrobat.adobe.com/us/en/why-adobe/about-adobe-pdf.html) (PDF) | `application/pdf` | -| `.ppt` | Microsoft PowerPoint | `application/vnd.ms-powerpoint` | -| `.pptx` | Microsoft PowerPoint (OpenXML) | `application/vnd.openxmlformats-officedocument.presentationml.presentation` | -| `.rar` | RAR archive | `application/x-rar-compressed` | -| `.rtf` | Rich Text Format (RTF) | `application/rtf` | -| `.sh` | Bourne shell script | `application/x-sh` | -| `.svg` | Scalable Vector Graphics (SVG) | `image/svg+xml` | -| `.swf` | [Small web format](https://en.wikipedia.org/wiki/SWF) (SWF) or Adobe Flash document | `application/x-shockwave-flash` | -| `.tar` | Tape Archive (TAR) | `application/x-tar` | -| `.tif .tiff` | Tagged Image File Format (TIFF) | `image/tiff` | -| `.ttf` | TrueType Font | `font/ttf` | -| `.txt` | Text, (generally ASCII or ISO 8859-_n_) | `text/plain` | -| `.vsd` | Microsoft Visio | `application/vnd.visio` | -| `.wav` | Waveform Audio Format | `audio/wav` | -| `.weba` | WEBM audio | `audio/webm` | -| `.webm` | WEBM video | `video/webm` | -| `.webp` | WEBP image | `image/webp` | -| `.woff` | Web Open Font Format (WOFF) | `font/woff` | -| `.woff2` | Web Open Font Format (WOFF) | `font/woff2` | -| `.xhtml` | XHTML | `application/xhtml+xml` | -| `.xls` | Microsoft Excel | `application/vnd.ms-excel` | -| `.xlsx` | Microsoft Excel (OpenXML) | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` | -| `.xml` | `XML` | `application/xml` 代码对普通用户来说不可读 ([RFC 3023](https://tools.ietf.org/html/rfc3023#section-3), section 3) `text/xml` 代码对普通用户来说可读 ([RFC 3023](https://tools.ietf.org/html/rfc3023#section-3), section 3) | -| `.xul` | XUL | `application/vnd.mozilla.xul+xml` | -| `.zip` | ZIP archive | `application/zip` | -| `.3gp` | [3GPP](https://en.wikipedia.org/wiki/3GP_and_3G2) audio/video container | `video/3gpp` `audio/3gpp`(若不含视频) | -| `.3g2` | [3GPP2](https://en.wikipedia.org/wiki/3GP_and_3G2) audio/video container | `video/3gpp2` `audio/3gpp2`(若不含视频) | -| `.7z` | [7-zip](https://en.wikipedia.org/wiki/7-Zip) archive | `application/x-7z-compressed` | +| 扩展名 | 文档类型 | MIME 类型 | +| --------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `.aac` | AAC 音频 | `audio/aac` | +| `.abw` | [AbiWord](https://zh.wikipedia.org/wiki/AbiWord) 文档 | `application/x-abiword` | +| `.apng` | 动态可移植网络图形(APNG)图像 | `image/apng` | +| `.arc` | 归档文件(嵌入多个文件) | `application/x-freearc` | +| `.avif` | AVIF 图像 | `image/avif` | +| `.avi` | AVI:音频视频交织文件格式(Audio Video Interleave) | `video/x-msvideo` | +| `.azw` | Amazon Kindle 电子书格式 | `application/vnd.amazon.ebook` | +| `.bin` | 任何二进制数据类型 | `application/octet-stream` | +| `.bmp` | Windows OS/2 位图 | `image/bmp` | +| `.bz` | BZip 归档 | `application/x-bzip` | +| `.bz2` | BZip2 归档 | `application/x-bzip2` | +| `.cda` | CD 音频 | `application/x-cdf` | +| `.csh` | C-Shell 脚本 | `application/x-csh` | +| `.css` | 层叠样式表(CSS) | `text/css` | +| `.csv` | 逗号分隔值(CSV) | `text/csv` | +| `.doc` | Microsoft Word | `application/msword` | +| `.docx` | Microsoft Word(OpenXML) | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` | +| `.eot` | MS 嵌入式 OpenType 字体 | `application/vnd.ms-fontobject` | +| `.epub` | 电子出版(EPUB) | `application/epub+zip` | +| `.gz` | GZip 压缩归档 | `application/gzip` | +| `.gif` | 图像互换格式(GIF) | `image/gif` | +| `.htm`, `.html` | 超文本标记语言(HTML) | `text/html` | +| `.ico` | 图标(Icon)格式 | `image/vnd.microsoft.icon` | +| `.ics` | iCalendar 格式 | `text/calendar` | +| `.jar` | Java 归档(JAR) | `application/java-archive` | +| `.jpeg`, `.jpg` | JPEG 图像 | `image/jpeg` | +| `.js` | JavaScript | `text/javascript` (规范:[HTML](https://html.spec.whatwg.org/multipage/#scriptingLanguages) 和 [RFC 9239](https://www.rfc-editor.org/rfc/rfc9239)) | +| `.json` | JSON 格式 | `application/json` | +| `.jsonld` | JSON-LD 格式 | `application/ld+json` | +| `.mid`, `.midi` | 音乐数字接口(MIDI) | `audio/midi`、`audio/x-midi` | +| `.mjs` | JavaScript 模块 | `text/javascript` | +| `.mp3` | MP3 音频 | `audio/mpeg` | +| `.mp4` | MP4 视频 | `video/mp4` | +| `.mpeg` | MPEG 视频 | `video/mpeg` | +| `.mpkg` | Apple 安装包 | `application/vnd.apple.installer+xml` | +| `.odp` | 开放文档演示稿文档 | `application/vnd.oasis.opendocument.presentation` | +| `.ods` | 开放文档表格文档 | `application/vnd.oasis.opendocument.spreadsheet` | +| `.odt` | 开放文档文本文档 | `application/vnd.oasis.opendocument.text` | +| `.oga` | OGG 音频 | `audio/ogg` | +| `.ogv` | OGG 视频 | `video/ogg` | +| `.ogx` | OGG | `application/ogg` | +| `.opus` | Opus 音频 | `audio/opus` | +| `.otf` | OpenType 字体 | `font/otf` | +| `.png` | 便携式网络图形 | `image/png` | +| `.pdf` | Adobe [便携式文档格式](https://www.adobe.com/acrobat/about-adobe-pdf.html)(PDF) | `application/pdf` | +| `.php` | 超文本预处理器(**Personal Home Page**) | `application/x-httpd-php` | +| `.ppt` | Microsoft PowerPoint | `application/vnd.ms-powerpoint` | +| `.pptx` | Microsoft PowerPoint(OpenXML) | `application/vnd.openxmlformats-officedocument.presentationml.presentation` | +| `.rar` | RAR 归档 | `application/vnd.rar` | +| `.rtf` | 富文本格式(RTF) | `application/rtf` | +| `.sh` | 伯恩 shell 脚本 | `application/x-sh` | +| `.svg` | 可缩放矢量图形(SVG) | `image/svg+xml` | +| `.tar` | 磁带归档(TAR) | `application/x-tar` | +| `.tif`, `.tiff` | 标签图像文件格式(TIFF) | `image/tiff` | +| `.ts` | MPEG 传输流 | `video/mp2t` | +| `.ttf` | TrueType 字体 | `font/ttf` | +| `.txt` | 文本(通常是 {{Glossary("ASCII")}} 或 ISO 8859-_n_) | `text/plain` | +| `.vsd` | Microsoft Visio | `application/vnd.visio` | +| `.wav` | 波形音频格式 | `audio/wav` | +| `.weba` | WEBM 音频 | `audio/webm` | +| `.webm` | WEBM 视频 | `video/webm` | +| `.webp` | WEBP 图像 | `image/webp` | +| `.woff` | Web 开放字体格式(WOFF) | `font/woff` | +| `.woff2` | Web 开放字体格式(WOFF) | `font/woff2` | +| `.xhtml` | XHTML | `application/xhtml+xml` | +| `.xls` | Microsoft Excel | `application/vnd.ms-excel` | +| `.xlsx` | Microsoft Excel(OpenXML) | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` | +| `.xml` | XML | [RFC 7303](https://datatracker.ietf.org/doc/html/rfc7303#section-4.1)(section 4.1)推荐使用 `application/xml`,但有时仍会使用 `text/xml`。你可以将特定的 MIME 类型分配给具有 `.xml` 扩展名的文件,这取决于其内容的解释方式。例如,Atom 消息来源是 `application/atom+xml`,而 `application/xml` 是默认的有效值。 | +| `.xul` | XUL | `application/vnd.mozilla.xul+xml` | +| `.zip` | ZIP 归档 | `application/zip` | +| `.3gp` | [3GPP](https://zh.wikipedia.org/wiki/3GP) 音视频容器 | `video/3gpp`;如果不包含视频则为 `audio/3gpp` | +| `.3g2` | [3GPP2](https://zh.wikipedia.org/wiki/3GP) 音视频容器 | `video/3gpp2`;如果不包含视频则为 `audio/3gpp2` | +| `.7z` | [7-zip](https://zh.wikipedia.org/wiki/7-Zip) 归档 | `application/x-7z-compressed` |