HTTP Caching
The set of headers that let a browser or intermediary reuse a previous response instead of re-fetching it.
HTTP Caching is the family of headers that let a browser, a CDN, or a proxy skip a request entirely, or skip its body, by reusing a response it already has. Cache-Control is the modern header doing most of the work: max-age sets how long a response is fresh without any revalidation at all, no-cache means always revalidate before using it (despite the name, it doesn't forbid caching), and no-store means never cache it at all — three genuinely different behaviors that a name like "no-cache" makes easy to mix up.
Once a cached response goes stale, the client doesn't necessarily re-download it — it can revalidate: ask the server "has this changed?" with a conditional request carrying an ETag or a last-modified date, and the server answers 304 Not Modified with no body if nothing changed, saving the bandwidth of the full response while still confirming freshness. This is the mechanism that makes aggressive caching safe: a max-age that expired doesn't mean a wasted round trip, just a cheap one.
Static-asset caching pushes this further by making the URL itself change whenever content does — a hash embedded in the filename (app.a3f9c1.js) — so the response can be cached with an effectively infinite max-age and no revalidation ever needed; a new deploy simply produces a new URL. That trick is what makes Preload and Prefetch and long-lived CDN caching viable together: the browser never has to ask whether a hashed-filename asset is stale, because a stale one is, by construction, a different file.
This layer is orthogonal to Cache Invalidation inside an application's own data layer — HTTP caching governs whether a response gets reused, application caching governs whether computed data does, and the two commonly disagree about what's fresh at the same moment.
See also4
ETag
An opaque fingerprint of a response's content that lets a client ask a server whether it's changed without re-downloading it.
Web Platform6 connections
Cache Invalidation
Deciding when a cached value has stopped being correct — famously one of the hard problems.
Web Platform21 connections
Preload and Prefetch
Two resource hints with opposite priorities — preload for what this page needs now, prefetch for what the next page might need.
Web Platform8 connections
Service Worker
A background script the browser runs between a page and the network, able to intercept requests even when no page is open.
Web Platform6 connections
Related1
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from7
- Content Delivery NetworkNetworks & Distribution
A CDN answers requests from servers near the requester, trading a single origin for many cached edges.
- Content Security PolicyWeb Platform
An HTTP header that tells the browser which sources of script, style, and other content a page is allowed to load.
- Cross-Origin Resource SharingWeb Platform
The mechanism by which a server opts in to letting scripts on other origins read its responses.
- ETagWeb Platform
An opaque fingerprint of a response's content that lets a client ask a server whether it's changed without re-downloading it.
- HTTP2 and HTTP3Web Platform
Two successive rewrites of HTTP's transport layer, each solving the previous version's head-of-line blocking at a different layer.
- Preload and PrefetchWeb Platform
Two resource hints with opposite priorities — preload for what this page needs now, prefetch for what the next page might need.
- Service WorkerWeb Platform
A background script the browser runs between a page and the network, able to intercept requests even when no page is open.