Cloudflare Cache Guide for Stale Website Updates
Trace a stale page or asset through browser, CDN and origin caches, then invalidate only what needs refreshing.

Quick answer
Identify the exact URL and stale content before purging anything. Compare the response from the visitor path with origin behavior using approved diagnostics. Version static assets and verify that personalized or sensitive responses bypass shared caching.
Diagnose an old design after a successful deploy
Suppose the page markup points to /assets/style.css and a designer replaced the bytes at that exact address. Visitors who cached that CSS for a long time may see a mixture of new markup and old styling. Inspect the document response and the stylesheet selected by the browser. In staging, give the changed file a new content-specific path, then update the document. Confirm that the deployed site references the new path and the old stylesheet can still be requested while old documents may remain cached. Scope an invalidation to documents or resources that need it. The server can return a successful status for both an old and a new asset, so use a revision marker or compare visible content.
Cache-Control affects conditional and shared handling according to the actual configured layers. Look at Age, documented cache-status indicators and the requested URL together. In a typical check, first open a known public asset twice and compare its bytes. Then use a controlled staging flow with two test identities to verify private replies are handled according to policy. Never assume a faster personalized response proves that a cache rule is safe. Test the exact path, query variation and cookie behavior identified by the application. If the new stylesheet is correct and an older page still refers to the old URL, diagnose the HTML delivery path before purging all assets. Update only the layers you own or where the provider instructs you to act.
Observe the precise stale response
A new stylesheet is live for some visitors but not for others. Before putting time or money into this step, agree on a concrete criterion. Treat whatever is essential to complete the job as a mandatory requirement. Keep convenience, speed and ease of handoff in a separate part of your notes. This helps you avoid promoting something that looks easier in a trial but cannot complete a critical part of the task.
Start here. Record the URL, file version, time and headers from successful and stale requests. Distinguish document HTML and the CSS it references.
The CSS file was updated but the HTML still links to an older version. Think through how a customer or colleague would discover this error. A clear, visible failure is easier to resolve than a result that looks successful and leaves a problem for the next person. If it would be hard to notice, add one direct inspection that examines the outcome itself. Record evidence for the result instead of relying entirely on a successful status label.
Confirm the result. Compare rendered sources and network requests from a clean session. Work through this step before expanding the change. One realistic example is enough to reveal a category of failures that an ideal example misses. A trial is also a useful time to learn what to do when the result is ambiguous, especially if different people would have to resolve disagreement.
Check service worker caching if the app uses it and regular browser cache tests disagree. Capture the decision and the reason in a short note so it can be revisited if the workload, policy or software changes.
Read the evidence at each cache
Example situation. A response has a CDN cache status and an Age header.
Review what the documented status means for the provider and route. Compare generated content from the approved origin context. Give the test enough room to show the original problem. Use the same entry point that someone with the issue would use. If several variables change between attempts, note which ones cannot be held constant and avoid assigning a cause yet. You can make a smaller experiment after getting that first picture.
A cache hit is treated as an error on an immutable asset that is exactly the correct version. It helps to document the specific contrast as soon as you see it. Save an innocuous screenshot, a small sample or a short time record if appropriate, with identifying details removed when they are unnecessary. The next person will need a result that can be interpreted without guessing what happened immediately before you captured it.
Inspect the outcome. Compare an expected revision in the actual bytes, not only a status label. If you need to hand this to support or a maintainer, include the expected outcome, the first unexpected observation and the last known working state.
Inspect the start and finish of a deployment to distinguish stale output from a failed build. Write down whether the follow-up confirms your original explanation or exposes another factor. Confirmed evidence supports a specific change. If the behavior still varies without a known reason, retain the last working settings and focus the next test on that variation.
Version long-lived assets
A visible redesign replaces a style bundle. Decide what should stay intact while you try the change. For a small trial this might be the original input, a visible result another person already depends on, or access from a second supported device. Keep an appropriate copy or note of the earlier state. Tests that are easy to reverse make it possible to learn even when the first idea is wrong.
Publish assets with stable content-specific filenames or explicitly supported version keys. Keep files used by earlier HTML while it can still be served.
Watch for this: An asset URL stays identical but its contents change underneath long-lived caching. Consider the exact point where you would stop and revert. If the issue appears, reproduce it without repeating a consequential action unnecessarily. A disposable example or read-only observation can give you the needed evidence. In a shared environment, tell others handling the test what state you expect to see before the next step.
Check that newly served HTML references the fresh asset and that it can be downloaded. Verify the ordinary case that should have remained intact as well as the intended improvement. If one passes and the other fails, keep both observations and examine the relationship between them.
Retain older hashed files during rollout if previous documents still reference them. Use the result to write a one-sentence acceptance condition. Make it specific enough that another person would know which setup to use and when to stop.
Avoid shared cache for personal content
A dashboard and public brochure share a proxy.
Verify authenticated, account-specific and private endpoints have appropriate cache controls and documented exclusions. Start with conditions you can readily repeat. Ask if your normal day includes a meaningful variation, such as a busy period, a second account or input from a different source. Select the variation based on your real use instead of trying every theoretical case.
A broad HTML cache rule also matches logged-in pages or a response carrying personalized data. Record whether you found a recurring failure, a one-time event or an unresolved observation. The three have different implications. A repeating mismatch is easier to verify and to pass along for repair. A one-time interruption can still matter, but document the context and look for a separate observation before committing to an explanation.
Use synthetic accounts in staging and verify separate identities never see one another’s responses. A simple check for the result usually beats a complicated proxy. If a reading looks surprising, return to the user-visible outcome and trace it back to the earliest relevant event you can observe. Comparing that observation to the expected rule may show exactly what additional information to collect.
Use public example requests for testing and review private routes whenever the cache rules change. Use a representative size or repetition count when it affects the result. If a small test and a normal-sized workload behave differently, include both in the handoff so the earlier test can be understood in context.
Choose a targeted purge
Use this case to review the plan. One public landing page must refresh shortly after an edit.
Use the provider’s supported targeted purge for the relevant URLs or tags. Consider which variants and cache keys actually exist. Write down who owns the setting, file, service or decision before considering the trial finished. In a personal setup that may simply mean keeping the needed information somewhere you can find it later. In a shared setup it may determine whether the next person is able to continue during an interruption. Give that person enough context to determine if the result still applies.
Failure that matters: The team purges everything on every deployment and still misses independent client cache behavior.
Check the targeted asset and a second unaffected asset for the intended behavior. A successful check has a concrete observable result. Confirm it from the normal user path, then put the test input and the observation in your notes. If cleanup is needed, remove test artifacts carefully and retain the benign evidence needed to repeat the test later.
Record whether the URL is present with different query, locale or device variants. Check any agreement about when to rerun the trial. An annual review can miss changes that happen at a specific release or after access is revoked. Conversely, some checks make sense on a fixed calendar because no individual event will remind you to try them. Choose the trigger that fits the use case and record a known starting point.
Distinguish routing from caching
Try it when you need to: A site intermittently shows content hosted on the previous server.
Confirm DNS, proxy target and the app serving public traffic before modifying cache rules.
Establish the expected result before starting. A useful way to make this concrete is to describe the one thing you plan to observe and the condition under which it should hold. Save a baseline using the same input or conditions you will use after the change. If another person helps, have them record the expected result independently. That can surface a difference in interpretation before you spend time debugging an apparent failure.
An easy mistake to miss: The CDN cache is purged although one DNS address still points to the old host.
Compare authoritative records, current public response and release identity. Preserve the comparison in a form you can come back to: write down the input, what you expected and what you actually saw. In a decision with several options, keep one record per option rather than changing the definition of success for each trial.
Test both IP families after a move when the host offers both. Think about whether this follow-up calls for revising the original rule or handling a separate case. If it is separate, keep the original test available and check that both cases still succeed. This is also useful when you need to explain why something that looked fine in a demonstration behaves differently in ordinary use.
Measure the effect on real tasks
The relevant page is correct after invalidation. This is a good place to watch where the result starts to differ from what you expect. Note the entry conditions and any settings or data that you have assumed. Take an initial reading, then do the work with those same conditions recorded. Avoid resetting everything at the first sign of trouble. A change that accidentally hides the symptom gives you less information about what caused it.
Check the read path through a normal browser, including images or scripts that users see. Measure load after warming the cache separately.
Inspect this failure: A purge is called successful because one isolated resource changed while the product page remains stale. Make the first follow-up test small enough to repeat without changing unrelated parts of the setup. Start at the first boundary you can observe, then check the next one only if the initial result was right. Write down the observations in order. A later symptom can look like the root problem if you check the later step first and do not have an earlier reading.
Compare the exact previously failing URL and UI state from a clean session. When the check is successful, repeat the ordinary action from its normal starting point. This catches results that only worked because the original test left a session, a temporary setting or a sample file in place. If somebody else follows the directions later, their starting conditions might be different.
Update release checks with an observable marker for newly published versions.
Track who controls each rule
A new maintainer needs to update caching after launch.
Begin with a simple case where you can tell if things went wrong even before looking at any reports. Keep a copy of the starting inputs and confirm the result that ought to follow from them. Ask what the user will see and what the underlying system ought to do. Those are worth checking separately when a screen, message or summary can still look correct even though a change did not reach the place you intended.
Document which rules live on the app, CDN and client. Include special handling for authentication and targeted invalidation.
An operator makes overlapping fixes and later cannot invert them safely. Include this possibility when you define a failure. Try a known good case beside the suspected one. If both fail in the same way, examine what they share. If only the particular case fails, save the difference that makes it a useful test.
How to verify: Trace a representative request and record the layer responsible for each visible header.
Review the notes after changing origin hosting or application routing. On the next pass, use a second representative input or condition to make sure the first result still applies. A narrow test can be decisive if it measures the thing you need. A wider sample is useful when your real work includes several distinct patterns and one result cannot stand for all of them.
A short verification checklist
| What to check | How to tell |
|---|---|
| Observe the precise stale response | Compare rendered sources and network requests from a clean session. |
| Read the evidence at each cache | Compare an expected revision in the actual bytes, not only a status label. |
| Version long-lived assets | Check that newly served HTML references the fresh asset and that it can be downloaded. |
| Avoid shared cache for personal content | Use synthetic accounts in staging and verify separate identities never see one another’s responses. |
## Useful public header checks
Use a header request such as `curl -sI https://example.com/assets/style.css` on an asset you control. Read Cache-Control, Age and provider-specific status alongside the actual version of the file. Compare the served HTML’s stylesheet address. A browser reload can use cached client state, so verify from a fresh browser session too. Use a targeted provider purge only after identifying the affected resource and relevant variants. Measure success by the correct visible result. Retain versioned file paths during rollout so old cached documents can keep loading the assets they reference.
Related reading
Reference documentation explains the relevant standards or workflow. Try the related FixHubLab resource for a practical next step. Use the FixHubLab blog to find the rest of the guide series.
