I am trying to understand the Cache-Control: max-age=0 configuration from below:
This is a snipet from HTTP Live Headers for a static image on our landing page after hitting refresh:
If-Modified-Since: Sat, 23 Jul 2011 02:05:28 GMT
If-None-Match: "21246-eb05-4a8b30415ea00"
**Cache-Control: max-age=0**
HTTP/1.1 304 Not Modified
Date: Tue, 06 Sep 2011 20:59:29 GMT
Server: IBM_HTTP_Server
Connection: Keep-Alive
Keep-Alive: timeout=6
Etag: "21246-eb05-4a8b30415ea00"
I see our Cache-Control
shows a max-age=0
. I found this explanation:
Cache Control: max-age
This is the HTTP 1.1 equivalent of the earlier Expires header available in HTTP 1.0. It implicitly tells the browser it may cache the page, but must re-validate with the server if the max-age is exceeded. Setting max-age to zero ensures that a page is never served from cache, but is always re-validated against the server.
If that is correct we should never pull the image from the browser cache which if you look at the 304
above is not correct? What does max-age=0
really mean?
We don't have any Caching configurations manually configured in the Apache httpd.conf so I assume we are using defaults for caching/etags.