← Back to headers
HTTP Header
Access-Control-Max-Age
CORSSpecifies how long the result of a CORS preflight request can be cached.
HTTP header reference, syntax, examples, and developer usage.
What is the Access-Control-Max-Age header?
The Access-Control-Max-Age HTTP header is used to transmit metadata between a client and server as part of HTTP requests or responses.
HTTP headers define how content should be interpreted, cached, authenticated, secured, or processed by browsers and APIs.
Direction
This header may appear in both HTTP requests and responses.
Syntax
Access-Control-Max-Age: <seconds>
Example
Access-Control-Max-Age: 86400
Common use cases
- Reducing repeated preflight requests
- Improving CORS performance
- Browser preflight caching
Common mistakes
- Using the header in the wrong request or response context
- Sending invalid header values
- Incorrect header syntax
- Assuming the header automatically changes server behaviour