HTTP cache control response headers
http://www.mnot.net/cache_docs/
http://code.google.com/speed/page-speed/docs/caching.html
Expires --\
|--> Or --\
Cache-Control --/ \
|--> And
Last-Modified --\ /
|--> Or --/
Etag --/
- The headers placed under [Or] classification: Only one of them need to be added. Adding both is just redundant information.
- Expires and Last-Modified were introduced in HTTP 1.0 specification.
- Cache-Control and Etag were introduced in HTTP 1.1 specification.
Cache-Control max-age value
http://www.web-caching.com/mnot_tutorial/how.html
The max-age value in Cache-Control header represents in seconds the freshness of the resource from the time of request.
Cache-Control value examples:
- no-cache
- For 1 day:
max-age=86400
- For 31 days:
max-age=2678400
- For 365 days:
max-age=31536000
|