默认值
当上下文没有提供更好的信息时,这些是发送的值。请注意,所有浏览器都会添加 */*
MIME 类型以涵盖所有情况。这通常用于通过浏览器地址栏或通过 HTML <a>
元素发起的请求。
用户代理 | 值 |
---|---|
Firefox 132 及更高版本 [1] | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
Firefox 128 至 131 | text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8 |
Firefox 92 至 127 | text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8 |
Firefox 72 至 91 [2] | text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 |
Firefox 66 至 71 [2] | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
Firefox 65 [2] | text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 |
Firefox 64 及更早版本 [2] | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
Safari 13.1 至 18.1+ [4] | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
Chrome 131+ [4] | text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 |
Safari, Chrome [4] | text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 |
Safari 5 [3] | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
Edge | text/html, application/xhtml+xml, image/jxr, */* |
Opera | text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 |
[1] 该值可以使用 network.http.accept
首选项 (about:config
) 设置为任意字符串。
[2] 该值可以使用 network.http.accept.default
首选项 (about:config
) 设置为任意字符串。
[3] 这是对早期 Accept
头的改进,因为它不再将 image/png
排在 text/html
之上。
[4] 重新检查并添加了 Safari 13.1 至 18.1 和 Chrome 131 的值。在指定版本之前,值可能已更改。
图像的值
当通过 HTML <img>
元素等请求图像时,用户代理通常会设置一个特定的媒体类型列表以供接受。
用户代理 | 值 |
---|---|
Firefox 128 及更高版本 [1] | image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5 |
Firefox 92 至 127 [1] | image/avif,image/webp,*/* |
Firefox 65 至 91 [1] | image/webp,*/* |
Firefox 47 至 63 [1] | */* |
Firefox 47 之前版本 [1] | image/png,image/*;q=0.8,*/*;q=0.5 |
Safari (Mac OS Big Sur 之后) | image/webp,image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5 |
Safari (Mac OS Big Sur 之前) | image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5 |
Chrome 和 Edge 121 及更高版本 | image/avif,image/webp,image/apng,image/*,*/*;q=0.8 |
[1] 该值可以使用 image.http.accept
参数(来源)设置为任意字符串。
视频的值
当通过 <video>
HTML 元素请求视频时,大多数浏览器使用特定值。
用户代理 | 值 |
---|---|
Firefox 3.6 及更高版本 | video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5 |
Firefox 3.6 之前版本 | 不支持 <video> |
Chrome | */* |
音频资源的值
当通过 <audio>
HTML 元素等请求音频文件时,大多数浏览器使用特定值。
用户代理 | 值 |
---|---|
Firefox 3.6 及更高版本 [1] | audio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5 |
Safari, Chrome | */* |
[1] 参见 bug 489071。
脚本的值
当通过 <script>
HTML 元素等请求脚本时,一些浏览器使用特定值。
用户代理 | 值 |
---|---|
Firefox [1] | */* |
Safari, Chrome | */* |
[1] 参见 bug 170789。
CSS 样式表的值
当通过 <link rel="stylesheet">
HTML 元素请求 CSS 样式表时,大多数浏览器使用特定值。
用户代理 | 值 |
---|---|
Firefox 4 [1] | text/css,*/*;q=0.1 |
Safari, Chrome | text/css,*/*;q=0.1 |
Opera 11.10 | text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 |
Konqueror 4.6 | text/css,*/*;q=0.1 |
[1] 参见 bug 170789。