--- title: Access-Control-Max-Age slug: Web/HTTP/Headers/Access-Control-Max-Age tags: - 超文本传输协议 - 跨域资源请求 - 首部 translation_of: Web/HTTP/Headers/Access-Control-Max-Age ---
The Access-Control-Max-Age
这个响应头表示 {{glossary("preflight request")}} (预检请求)的返回结果(即 {{HTTPHeader("Access-Control-Allow-Methods")}} 和{{HTTPHeader("Access-Control-Allow-Headers")}} 提供的信息) 可以被缓存多久。
报头类型 | {{Glossary("Response header")}} |
---|---|
{{Glossary("Forbidden header name")}} | no |
Access-Control-Max-Age: <delta-seconds>
将预检请求的结果缓存10分钟:
Access-Control-Max-Age: 600
规范 | 状态 | 注释 |
---|---|---|
{{SpecName('Fetch','#http-access-control-max-age', 'Access-Control-Max-Age')}} | {{Spec2("Fetch")}} | Initial definition. |
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
{{Compat("http.headers.Access-Control-Max-Age")}}