A browser cache is local storage for copies of web responses that a browser may reuse. When a page requests an image, stylesheet, script, font, or document, the browser can save the response together with instructions supplied in HTTP headers. On a later request, it first checks whether a suitable stored response exists. Reusing that copy can avoid a full trip to the origin server, cutting latency, bandwidth use, and server work. The cache is therefore a controlled reuse system, not simply a folder of permanent downloads. The stored material is managed automatically and can be evicted when space is needed, even before its advertised lifetime has ended.
Each stored response has a cache key. The request method and target URI are central parts of that key, and a server can use the Vary header to say that selected request headers create separate variants. For example, compressed and uncompressed responses may be stored independently. A cache also records when a response was received and how long it can remain fresh. Cache-Control directives such as max-age, or the older Expires header, give the browser the information needed to calculate that freshness lifetime. This prevents a response created for one language, encoding, or device preference from being incorrectly reused for a request that needs another variant.
If a matching response is still fresh, the browser can usually use it without contacting the server. If it is stale, reuse may still be possible after validation. The browser can send an entity tag in If-None-Match or a modification date in If-Modified-Since. The server compares that validator with the current resource. When nothing relevant changed, it can return a compact 304 Not Modified response instead of sending the entire representation again. The browser then reuses its stored body and updates the response metadata. Validation still uses a network request, but it usually transfers far fewer bytes and confirms that the cached body remains current.
Cache-Control vocabulary is easy to misread. The private directive allows storage by a private cache such as a browser while preventing reuse by shared caches. Public explicitly permits shared storage when other rules might not. No-cache does not mean never store; it generally means the response must be validated before reuse. No-store is the stronger request not to store the response. Sites often give versioned static assets long freshness periods while requiring frequently changing HTML or personalized information to be checked more carefully. Other directives control whether stale content may be served during errors, whether transformations are allowed, and how intermediate caches interpret a response.
Good caching improves speed, but careless caching can expose personal information or show an obsolete resource. Shared intermediaries must not reuse one user’s private response for another user. Developers also need a way to replace long-lived assets, which is why build systems put a content version or hash in filenames. Service workers add another programmable caching layer and can follow rules separate from the ordinary HTTP cache. Because several layers may be involved, an old page does not always mean the browser’s built-in cache is malfunctioning. Sensitive responses may also depend on cookies or authorization headers, so publishers should test behavior in both private and shared caching environments.
A normal reload asks the browser to recheck the page, while a hard reload commonly bypasses or more aggressively revalidates cached resources for that navigation. Clearing site data removes useful copies as well as potentially stale ones, so it should not be the first explanation for every problem. For users, the key idea is that a browser follows server-provided policies and validators to decide when reuse is safe. For publishers, correct cache headers balance quick repeat visits with privacy and timely updates, turning saved responses into a predictable performance tool. Developer tools can reveal the response headers, whether a resource came from memory or disk cache, and whether a validation request received a 304 response.
A fresh response is still within its permitted reuse lifetime, so the browser can generally use it without first asking the origin server to validate it.
No-cache usually allows storage but requires validation before reuse. No-store instructs caches not to store the response.
Cache directives, an intermediary cache, a service worker, offline behavior, or a versioned asset still referenced by the page can all affect what appears.
Explore more "Explainers"
Discover additional explainers across politics, science, business, technology, and other fields. Each explainer breaks down a complex idea into clear, everyday language—helping you better understand how major concepts, systems, and debates shape the world around us.
