Access-Control-Max-Age
The Access-Control-Max-Age
这个响应头表示 preflight request (预检请求)的返回结果(即 Access-Control-Allow-Methods
和Access-Control-Allow-Headers
提供的信息)可以被缓存多久。
报头类型 | Response header |
---|---|
Forbidden header name | no |
语法
Access-Control-Max-Age: <delta-seconds>
指令
示例
将预检请求的结果缓存 10 分钟:
Access-Control-Max-Age: 600
规范
Specification |
---|
Fetch Standard # http-access-control-max-age |
浏览器兼容性
BCD tables only load in the browser