Name

Cache-Control

Synopsis

                        Cache-Control: directives
                     

Specifies caching directives in a comma-separated list.

Cache Request Directives

no-cache 2n

Do not cache.

no-store

Remove information promptly after forwarding.

max-age = seconds

Do not send responses older than seconds.

max-stale [ = seconds ]

Send expired data. If seconds are specified, only send data expired by less than the specified number of seconds.

min-fresh = seconds

Send data only if still fresh after the specified number of seconds.

only-if-cached

Do not retrieve new data. Only return data already in the cache. Useful unless the network connection is down.

Cache Response Directives

public

Cachable by any cache.

private

Not cachable by a shared cache.

no-cache

Do not cache.

no-store

Remove information promptly after forwarding.

no-transform

Do not convert data.

must-revalidate

Client must revalidate the data.

proxy-revalidate

Client must revalidate data except for private client caches.

max-age= seconds

The document should be considered stale in the specified number of seconds.

Get Webmaster in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.