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 AgentValueComment
Firefox

text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (since Firefox 66)

text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 (in Firefox 65)

text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (before)

In Firefox 65 and earlier, this value can be modified using the network.http.accept.default parameter. (source)
Safari, Chrome

text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8

(source)
Safari 5

text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

This is an improvement over earlier Accept headers as it no longer ranks image/png above text/html
Internet Explorer 8image/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).
Edgetext/html, application/xhtml+xml, image/jxr, */*
Operatext/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 AgentValueComment
Firefox

image/webp,*/* (since Firefox 65)
*/* (since Firefox 47)
image/png,image/*;q=0.8,*/*;q=0.5 (before)

This value can be modified using the image.http.accept parameter. source
Safariimage/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5
Chromeimage/avif,image/webp,image/apng,image/*,*/*;q=0.8source
Internet Explorer 8 or earlier*/*See IE and the Accept Header (IEInternals' MSDN blog)
Internet Explorer 9image/png,image/svg+xml,image/*;q=0.8, */*;q=0.5See 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 AgentValueComment
Firefox earlier than 3.6no support for <video>
Firefox 3.6 and latervideo/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5See bug 489071 source
Chrome*/*source
Internet Explorer 8 or earlierno 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 AgentValueComment
Firefox 3.6 and lateraudio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5See bug 489071 source
Safari, Chrome*/*source
Internet Explorer 8 or earlierno 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 AgentValueComment
Firefox*/*See bug 170789
Safari, Chrome*/*source
Internet Explorer 8 or earlier*/*See IE and the Accept Header (IEInternals' MSDN blog)
Internet Explorer 9application/javascript, */*;q=0.8See 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 AgentValueComment
Firefox 4text/css,*/*;q=0.1See bug 170789 source
Internet Explorer 8 or earlier*/*See IE and the Accept Header (IEInternals' MSDN blog)
Internet Explorer 9text/cssSee Fiddler is better with Internet Explorer 9 (IEInternals' MSDN blog)
Safari, Chrometext/css,*/*;q=0.1source
Opera 11.10text/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.6text/css,*/*;q=0.1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:103 次

字数:10765

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文