目录搜索
GuidesAccess control CORSAuthenticationBrowser detection using the user agentCachingCaching FAQCompressionConditional requestsConnection management in HTTP 1.xContent negotiationContent negotiation: List of default Accept valuesCookiesCSPMessagesOverviewProtocol upgrade mechanismProxy servers and tunnelingProxy servers and tunneling: Proxy Auto-Configuration (PAC) filePublic Key PinningRange requestsRedirectionsResources and specificationsResources and URIsResponse codesServer-Side Access ControlSessionGuides: BasicsBasics of HTTPChoosing between www and non-www URLsData URIsEvolution of HTTPIdentifying resources on the WebMIME TypesMIME types: Complete list of MIME typesCSPContent-Security-PolicyContent-Security-Policy-Report-OnlyCSP: base-uriCSP: block-all-mixed-contentCSP: child-srcCSP: connect-srcCSP: default-srcCSP: font-srcCSP: form-actionCSP: frame-ancestorsCSP: frame-srcCSP: img-srcCSP: manifest-srcCSP: media-srcCSP: object-srcCSP: plugin-typesCSP: referrerCSP: report-uriCSP: require-sri-forCSP: sandboxCSP: script-srcCSP: style-srcCSP: upgrade-insecure-requestsCSP: worker-srcHeadersAcceptAccept-CharsetAccept-EncodingAccept-LanguageAccept-RangesAccess-Control-Allow-CredentialsAccess-Control-Allow-HeadersAccess-Control-Allow-MethodsAccess-Control-Allow-OriginAccess-Control-Expose-HeadersAccess-Control-Max-AgeAccess-Control-Request-HeadersAccess-Control-Request-MethodAgeAllowAuthorizationCache-ControlConnectionContent-DispositionContent-EncodingContent-LanguageContent-LengthContent-LocationContent-RangeContent-TypeCookieCookie2DateDNTETagExpectExpiresForwardedFromHeadersHostIf-MatchIf-Modified-SinceIf-None-MatchIf-RangeIf-Unmodified-SinceKeep-AliveLarge-AllocationLast-ModifiedLocationOriginPragmaProxy-AuthenticateProxy-AuthorizationPublic-Key-PinsPublic-Key-Pins-Report-OnlyRangeRefererReferrer-PolicyRetry-AfterServerSet-CookieSet-Cookie2SourceMapStrict-Transport-SecurityTETkTrailerTransfer-EncodingUpgrade-Insecure-RequestsUser-AgentUser-Agent: FirefoxVaryViaWarningWWW-AuthenticateX-Content-Type-OptionsX-DNS-Prefetch-ControlX-Forwarded-ForX-Forwarded-HostX-Forwarded-ProtoX-Frame-OptionsX-XSS-ProtectionMethodsCONNECTDELETEGETHEADMethodsOPTIONSPATCHPOSTPUTStatus100 Continue101 Switching Protocols200 OK201 Created202 Accepted203 Non-Authoritative Information204 No Content205 Reset Content206 Partial Content300 Multiple Choices301 Moved Permanently302 Found303 See Other304 Not Modified307 Temporary Redirect308 Permanent Redirect400 Bad Request401 Unauthorized403 Forbidden404 Not Found405 Method Not Allowed406 Not Acceptable407 Proxy Authentication Required408 Request Timeout409 Conflict410 Gone411 Length Required412 Precondition Failed413 Payload Too Large414 URI Too Long415 Unsupported Media Type416 Range Not Satisfiable417 Expectation Failed426 Upgrade Required428 Precondition Required429 Too Many Requests431 Request Header Fields Too Large451 Unavailable For Legal Reasons500 Internal Server Error501 Not Implemented502 Bad Gateway503 Service Unavailable504 Gateway Timeout505 HTTP Version Not Supported511 Network Authentication RequiredStatus
文字

默认值

这些是在上下文不提供更好信息时发送的值。请注意,所有浏览器都会添加*/*MIME类型以涵盖所有情况。这通常用于通过浏览器的地址栏或通过HTML <a>元素启动的请求。

用户代理

评论

火狐

text / html的,应用/ XHTML + xml的,应用/ XML; Q = 0.9,* / *; Q = 0.8

该值可以使用network.http.accept.default参数进行修改。

Safari,Chrome

application / xml,application / xhtml + xml,text / html; q = 0.9,text / plain; q = 0.8,image / png,* / *; q = 0.5

资源

Safari 5

text / html的,应用/ XHTML + xml的,应用/ XML; Q = 0.9,* / *; Q = 0.8

这是对先前Accept头的改进,因为它不再对text / html上面的image / png进行排名

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,* / *

请参阅IE和Accept Header(IEInternals的MSDN博客)。

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


图像的值

当通过HTML <img>元素请求图片时,用户代理通常会设置一个特定的媒体类型列表来欢迎。

用户代理

评论

火狐

* / *(自Firefox 47开始)image / png,image / *; q = 0.8,* / *; q = 0.5(之前)

这个值可以使用image.http.accept参数修改。

苹果浏览器

*/*


Chrome

图像/ WEBP,图像/ *,* / *; Q = 0.8

* * *在支持webp之前

Internet Explorer 8或更早版本

*/*

请参阅IE和Accept Header(IEInternals的MSDN博客)

Internet Explorer 9

image / png,image / svg + xml,image / *; q = 0.8,* / *; q = 0.5

查看Fiddler对于Internet Explorer 9更好(IEInternals的MSDN博客)

视频值

当请求视频时,可以通过<video>HTML元素,大多数浏览器都使用特定的值。

用户代理

评论

Firefox早于3.6

不支持<video>


Firefox 3.6及更高版本

audio / webm,audio / ogg,audio / wav,audio / *; q = 0.9,application / ogg; q = 0.7,video / *; q = 0.6; * / *; Q = 0.5

见bug 489071

Chrome

*/*


Internet Explorer 8或更早版本

不支持<video>


音频资源的值

当请求音频文件时,例如通过<audio>HTML元素时,大多数浏览器都使用特定的值。

用户代理

评论

Firefox 3.6及更高版本

音频/ WEBM,音频/ OGG,音频/ WAV,音频/ *; Q = 0.9,应用/ OGG; Q = 0.7,视频/ *; Q = 0.6,* / *; Q = 0.5

见bug 489071

Safari,Chrome

?


Internet Explorer 8或更早版本

不支持<audio>


Internet Explorer 9

?


脚本的值

当请求脚本时(例如通过<script>HTML元素),某些浏览器使用特定的值。

用户代理

评论

火狐

*/*

看到错误170789

Safari,Chrome

*/*


Internet Explorer 8或更早版本

*/*

请参阅IE和Accept Header(IEInternals的MSDN博客)

Internet Explorer 9

application / javascript,* / *; q = 0.8

查看Fiddler对于Internet Explorer 9更好(IEInternals的MSDN博客)

CSS样式表的值

当请求CSS样式表时,通过<link rel="stylesheet">HTML元素,大多数浏览器都使用特定的值。

用户代理

评论

Firefox 4

文本/ CSS,* / *; Q = 0.1

出现错误170789

Safari 5

文本/ CSS,* / *; Q = 0.1


Internet Explorer 8或更早版本

*/*

请参阅IE和Accept Header(IEInternals的MSDN博客)

Internet Explorer 9

文/ CSS

查看Fiddler对于Internet Explorer 9更好(IEInternals的MSDN博客)

Chrome 12

文本/ 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

文本/ CSS,* / *; Q = 0.1


上一篇:下一篇: