CORS · Response header
Access-Control-Max-Age
How long the browser may cache the preflight response.
What is Access-Control-Max-Age?
Reduces the frequency of expensive OPTIONS preflights by allowing browsers to cache them for the given number of seconds.
Typical usage
Set on preflight responses.
Examples
Access-Control-Max-Age: 86400Frequently asked questions
What is the Access-Control-Max-Age HTTP header?
Reduces the frequency of expensive OPTIONS preflights by allowing browsers to cache them for the given number of seconds.
Is Access-Control-Max-Age a request or response header?
Access-Control-Max-Age is a response header — the server sends it to the client. Set on preflight responses.
What does a Access-Control-Max-Age header look like?
A typical Access-Control-Max-Age header looks like: Access-Control-Max-Age: 86400.
Related headers
Access-Control-Allow-Methods
Which HTTP methods are allowed on the cross-origin resource.
Access-Control-Allow-Origin
Which origins may read this response cross-origin.
Access-Control-Allow-Headers
Which request headers may be used in the actual cross-origin request.
Access-Control-Allow-Credentials
Whether cookies and Authorization can be sent cross-origin.
Origin
The origin (scheme + host + port) of the request.