How Browser Caching Decides What Reloads and What Stays Put
Press refresh on a page and some things update instantly while others stubbornly stay the same until a hard refresh or a cleared cache forces the issue. This is not random.

Press refresh on a page and some things update instantly while others stubbornly stay the same until a hard refresh or a cleared cache forces the issue. This is not random. A browser follows a fairly strict set of rules, mostly dictated by headers the server sent along with each file, to decide whether to trust a stored copy or go fetch a fresh one. Understanding that decision process explains a surprising number of deployment headaches that otherwise look like mysterious bugs, and it turns a frustrating guessing game into a short, predictable checklist.
Every cached file carries its own expiration instructions
When a browser first downloads a file, the server response includes caching headers that specify how long that file should be considered valid without rechecking. A file with a long cache lifetime gets reused silently for that entire period, with the browser never even asking the server whether anything changed, because it was explicitly told not to bother asking. This is why updating an image or a script on the server sometimes has zero visible effect for visitors who loaded the old version recently, their browser is doing exactly what it was instructed to do.
A normal reload is not the same as a hard refresh
Pressing the regular reload button typically still allows the browser to use cached resources that have not expired yet, which is why a simple reload often fails to show a change that was just deployed. A hard refresh, or clearing the cache directly, forces the browser to skip that stored copy and ask the server for everything fresh, which is the actual test that proves whether a change deployed correctly rather than the deployment itself being broken. This distinction matters directly when debugging the kind of request flow covered in what happens after you type a url, where caching sits as an early step the browser checks before it even considers making a new request.
Filenames with version hashes solve the problem at the source
Rather than fighting the cache, many sites sidestep the issue entirely by including a version identifier inside the filename itself, so a script or stylesheet becomes a genuinely different file the moment its content changes, with a long cache lifetime applied safely because the old filename is never reused for new content. Visitors with an aggressively cached old version simply never ask for it again, because the page now references a different filename altogether, and they fetch the new one as if it were any other new resource.
The cache sits in front of several other layers, not just the browser
Browser caching is often only the first layer a request passes through. A content delivery network, a reverse proxy, or server-side caching can each hold their own separate copy with their own separate expiration rules, and a file can look perfectly fresh at the browser level while an intermediate layer is still serving something outdated underneath. Diagnosing a stubborn stale page sometimes means checking each of these layers in order rather than assuming the browser is always the one holding onto the old copy, a pattern that shows up just as often on the frontend side of a project as on the server side.
Mobile networks add their own unpredictable caching
Some mobile carriers and public wifi networks run their own transparent caching layers between a phone and the actual website, entirely outside the control of either the browser or the site's own server configuration. A page that reloads correctly on a home connection can still show stale content on a train or in a cafe, simply because a network-level cache along that specific path has not yet refreshed its own copy, which is one more reason a user report of stale content does not always point back to something the developer did wrong.
Conditional requests avoid re-downloading unchanged files
Even after a cached file technically expires, the browser does not always need to re-download the whole thing from scratch. It can send a conditional request asking the server whether the file has actually changed since the last version it has stored, and if nothing changed, the server replies with a short not-modified response instead of the full file. This keeps repeat visits fast without requiring the aggressive long cache lifetimes that cause the stubborn staleness problem in the first place, striking a middle ground between always re-downloading and never checking at all.
Service workers add a layer that behaves differently again
A site using a service worker for offline support manages its own cache entirely in code, separate from the ordinary browser caching headers described above, which means a service worker can keep serving an old version of a page indefinitely if its own update logic has a bug, regardless of what caching headers the server sends. Debugging a stale page on a site known to use service workers usually means checking the service worker's own cache storage directly, through the browser's developer tools, rather than assuming the standard caching rules are the ones in control.
What to check when a deployed change refuses to show up
Before assuming a deployment failed, confirm whether the browser is actually requesting the new file at all by checking the network panel in developer tools, since a file served from cache without any network request will show that clearly. If the request is happening but still returning old content, the issue sits further back, in a proxy or delivery network layer, rather than in the browser itself, and chasing the wrong layer wastes far more time than checking the request first would have. Keeping this short checklist, browser request, then proxy or delivery network, then service worker, in that order, turns what feels like a mysterious deployment bug into a five-minute process of elimination almost every time. Sharing that same checklist with teammates, rather than keeping the knowledge in one person's head, means the next stale-page report gets resolved just as quickly even when the usual person is not the one who picks it up.
More in Browsers
Browsers
How Browsers Decide Which Cookies to Send With a Request
Most developers set a cookie, watch it appear in storage, and assume it rides along on every request after that. It does not.
Browsers
Why Online Game Players Should Keep Their Browser Up to Date
Browser update prompts are easy to ignore. The little arrow or the "relaunch to update" button sits in the corner for days...
Browsers
What Actually Happens Between Typing a URL and Seeing a Page
It is the oldest interview question in web development, and most answers stop at "DNS lookup, then HTTP request, then the page...