Cache-Control Header Notes (and web browser cache management in general)
-
REM: there are different caching concepts and levels of cache.
-
DRAFT:
-
Etag (files like JPG)
-
Cache-Control header in HTTP protocol, in conjunction with expires header.
-
-
-
See a web pages cache settings, curl --head http://google.com
-
Firefox Developer also works.
-
Hosted - https://redbot.org/ - provides analysis
-
Hosted (free) analyzer - https://www.giftofspeed.com/cache-checker/ - it fetches page and all components and shows the cache settings of each file (e.g. images) - but doesn't seem to report the Cache-Control header.
-
Good Doc: http://palizine.plynt.com/issues/2008Jul/cache-control-attributes/
-
-
Cache-Control: private -- lets the client browser do whatever caching it wants
-
Cache Control: max-age -- sets a max age -- must be a syntax to this...
-
Cache Control: No-cache -- officially requires a test before refetching, in practice, browsers consider this "do not cache"
-
-
Google - http://www.google.com on 2014-09 uses - Cache-Control: private, max-age=0
-
Google Logo - Cache-Control: private, max-age=31536000 (but I think the URL to the image changes)
-
-
max-age is in seconds - max-age=2592000 = 30 days (60sec * 60min * 24hours * 30days)
-
Good thread: https://stackoverflow.com/questions/1046966/whats-the-difference-between-cache-control-max-age-0-and-no-cache
-
no-cache sounds safer that max-age=0 - MUST not vs SHOULD not.
tags: cache, expiry
>>
Leonard Chan's Homepage
>>
Scribble Web
>> Cache-Control Header Notes (and web browser cache management in general)