HTTP headers notes
27th June, 2013
Caching
Cache-Control
The Cache-Control header defines two things.
- whether the resource is
publicorprivate, i.e. if it should be cached by any proxy, or by only the ultimate reciever. max-age: how long to cache the resource in seconds
e.g. Cache-Control:public, max-age=86400
max-age can be left out if you instead include an Expires header.
Expires
Expires optionally accompanies Cache-Control, setting a date after which browsers should re-fetch the resouce.
e.g. Expires: Mon, 25 Jun 2012 21:31:12 GMT
If a Cache-Control max-age is specified, it overrides Expires.