Cache-Control

The Cache-Control header indicates the behavior expected for any caching system, usually an intermediate caching proxy that lies between the Web client and the Web server. An example use of the header is as follows:

Cache-Control: max-age=600 

Multiple directives may be specified with a single Cache-Control header as a comma-delimited list. This is illustrated by the following example:

Cache-Control: max-age=600, no-cache=”Set-Cookie” 

Depending on whether the Cache-Control header is included in the HTTP request or the HTTP response, it can be assigned a different set of values. Each of these values (usually called directives) is interpreted in a very specific way so that caching systems behave exactly as expected.

For HTTP requests, ...

Get HTTP Developer’s Handbook 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.