List of default Accept values - HTTP 编辑
This article documents the default values for the HTTP Accept
header for specific inputs and browser versions.
Default values
These are the values sent when the context doesn't give better information. Note that all browsers add the */*
MIME Type to cover all cases. This is typically used for requests initiated via the address bar of a browser, or via an HTML <a>
element.
User Agent | Value | Comment |
---|---|---|
Firefox |
| In Firefox 65 and earlier, this value can be modified using the network.http.accept.default parameter. (source) |
Safari, Chrome |
| (source) |
Safari 5 |
| This is an improvement over earlier Accept headers as it no longer ranks image/png above text/html |
Internet Explorer 8 | image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */* | See IE and the Accept Header (IEInternals' MSDN blog). |
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 |
Values for an image
When requesting an image, like through an HTML <img>
element, user-agent often sets a specific list of media types to be welcomed.
User Agent | Value | Comment |
---|---|---|
Firefox |
| This value can be modified using the image.http.accept parameter. source |
Safari | image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5 | |
Chrome | image/avif,image/webp,image/apng,image/*,*/*;q=0.8 | source |
Internet Explorer 8 or earlier | */* | See IE and the Accept Header (IEInternals' MSDN blog) |
Internet Explorer 9 | image/png,image/svg+xml,image/*;q=0.8, */*;q=0.5 | See Fiddler is better with Internet Explorer 9 (IEInternals' MSDN blog) |
Values for a video
When a video is requested, via the <video>
HTML element, most browsers use specific values.
User Agent | Value | Comment |
---|---|---|
Firefox earlier than 3.6 | no support for <video> | |
Firefox 3.6 and later | video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5 | See bug 489071 source |
Chrome | */* | source |
Internet Explorer 8 or earlier | no support for <video> |
Values for audio resources
When an audio file is requested, like via the <audio>
HTML element, most browsers use specific values.
User Agent | Value | Comment |
---|---|---|
Firefox 3.6 and later | audio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5 | See bug 489071 source |
Safari, Chrome | */* | source |
Internet Explorer 8 or earlier | no support for <audio> | |
Internet Explorer 9 | ? |
Values for scripts
When a script is requested, like via the <script>
HTML element, some browsers use specific values.
User Agent | Value | Comment |
---|---|---|
Firefox | */* | See bug 170789 |
Safari, Chrome | */* | source |
Internet Explorer 8 or earlier | */* | See IE and the Accept Header (IEInternals' MSDN blog) |
Internet Explorer 9 | application/javascript, */*;q=0.8 | See Fiddler is better with Internet Explorer 9 (IEInternals' MSDN blog) |
Values for a CSS stylesheet
When a CSS stylesheet is requested, via the <link rel="stylesheet">
HTML element, most browsers use specific values.
User Agent | Value | Comment |
---|---|---|
Firefox 4 | text/css,*/*;q=0.1 | See bug 170789 source |
Internet Explorer 8 or earlier | */* | See IE and the Accept Header (IEInternals' MSDN blog) |
Internet Explorer 9 | text/css | See Fiddler is better with Internet Explorer 9 (IEInternals' MSDN blog) |
Safari, Chrome | text/css,*/*;q=0.1 | source |
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 |
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论