HTTP Caching Explained: ETag, Cache-Control and 304 Responses Measured
A developer lecture covers how HTTP caches decide whether to reuse a stored response, based on freshness and revalidation. It explains that Cache-Control max-age controls how long a copy may be reused without contacting the server, while stale copies are checked with conditional requests. ETag and Last-Modified act as validators, and a 304 Not Modified response tells the cache its copy is still valid. The author tested these behaviours on a local Mac using Python and PHP servers and curl. The piece also warns about common bugs that make caching either ineffective or serve outdated files.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in