DevKits

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: 86400

Frequently 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

Work with this header