HTML and CSS Reference
Do not allow a proxy to use a stale response, even if it
has been configured to do so.
max-age = seconds
Serve from the cache only until the specified number of
seconds since the original request has elapsed
Dynamically generated pages written in PHP and the like can use the customary mechanisms to set Cache-
Control headers. For static pages, details vary from server to server. In Apache, you can use the mod_headers
module to specify per-file and per-directory Cache-Controls. This module is not typically compiled in by default,
and it may require a custom compilation to use. Assuming it is turned on, you can place a Header directive in
any Files, Directory, or Location section in your .htconfig file, or you can place it in an .htaccess file to make it
apply to every file in the same directory. For example, this line requests that only private caching be performed:
Header append Cache-Control "private"
This line requests that the pages be cached but revalidated:
Header set Cache-Control "public, must-revalidate"
The use of the set keyword instead of append means that this header will replace any other Cache-Control
headers that might be set by other modules, rather than being merged with them.