Cache-Control HTTP Header

Cache-Control

Inform all caching mechanisms from server to client whether they may cache this object.

Accepted Values

Multiple options from the list below are allowed, each seperated by a comma. Some options take a value, and that is preceded with an = after the option.
immutable

Response will not change.

max-age=<integer>

The time a browser should remember a site can only be accessed with https (seconds).

max-age=4
max-stale=<integer>

Client will accept stale responses (seconds).

max-stale=4
min-fresh=<integer>

Client wants a response that will be fresh for the given time (seconds).

min-fresh=4
must-revalidate

Stale caches must not be used.

no-cache

May be stored by any cache but must be validated by the server.

no-store

May not be stored by any cache.

no-transform

Intermediate cache or proxy cannot modify the response or certain headers.

only-if-cached

Do not use the network for responses.

private

May only be stored by a browser cache.

proxy-revalidate

Stale shared caches must no be used.

public

May be stored by any cache.

s-maxage=<integer>

Override max-age for shared caches, ignored by private caches.

s-maxage=4
stale-if-error=<integer>

Client will accept a stale response if the check for a fresh one fails (seconds).

stale-if-error=4
stale-while-revalidate=<integer>

Client will accept a stale response and will check for a fresh one (seconds).

stale-while-revalidate=4

Example

Cache-Control: public, private, max-age=4, s-maxage=4

Parse

Enter a Cache-Control header below to parse and return details about it.

Reference

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control