預設 Accept 值列表
本文件記錄了特定輸入和瀏覽器版本下 HTTP Accept 標頭的預設值。
預設值
這些是在上下文無法提供更多資訊時傳送的值。請注意,所有瀏覽器都會新增 */* MIME 型別以涵蓋所有情況。這通常用於透過瀏覽器位址列或透過 HTML <a> 元素髮起的請求。
| 使用者代理 | 值 |
|---|---|
| Firefox 128 及更高版本 [1] | 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 [1] | 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、Chrome | 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 之上。
影像的值
在請求影像時,例如透過 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(自 macOS Big Sur 起) | image/webp,image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5 |
| Safari(macOS 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 引數(原始碼)可以將該值設定為任意字串。
影片的值
音訊資源的值
指令碼的值
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] 請參閱 錯誤 170789。