When a changed page or asset still looks old, the stale copy may be in the browser, a service worker, a CDN edge, an upstream cache, or the origin itself. Purging a CDN only affects that CDN's stored objects. The origin is the server or service supplying content to the CDN. If the origin still returns the old version, the CDN can fetch and cache that version again after a purge. Identify where the old content is coming from, confirm that the origin serves the intended version, and purge the matching CDN entries.

A purge by URL is a useful starting point when only a few files have changed. Cloudflare provides this option alongside broader ways to select cached content; other CDNs have their own controls. Clearing an entire cache can send a surge of requests to the origin while leaving an old browser copy or an outdated origin response untouched.

Identify Which Layer Serves the Old Version

Record the full URL, including scheme, hostname, path, and relevant query string, plus the content version you expected and actually received. Open the Network panel in the browser's developer tools, select the affected request, and inspect the response body, status, and cache indicators. Check Cache-Control, Age, ETag, and Last-Modified when those headers are present. A browser may report a memory or disk cache hit without contacting the CDN at all. A service worker, which is a script that can handle requests for a web application, may return a response from separate browser storage.

Compare a normal reload with a request that bypasses the browser's HTTP cache. For example, Chrome DevTools has a Disable cache option in the Network panel; keep DevTools open while testing. Check separately whether a service worker supplied the response, and use Cloudflare's CF-Cache-Status header to help identify whether the request used the CDN cache. If the CDN reports a cache miss but returns the old version, check the origin and any upstream cache. When more than one caching service handles the request, check each service to locate the outdated response.

Use your hosting platform's preview or another authorized method to request the content from the origin, with the correct hostname and certificate checks. Verify the origin has the new file or page and sends appropriate cache headers. If the origin response is outdated, publish or regenerate the correct content there before purging the CDN. When several origin servers serve the same site, confirm that each server has the intended version; otherwise later requests may cache an old response again.

Inspect Cache Keys and Freshness

A cache key identifies which stored response matches a request. The URL is often central, but a CDN configuration can vary by query parameters, selected headers, cookies, device type, or image transformation settings. Check which request details the cache rules use before deciding what to purge. Two requests for the same path may reach different stored variants.

A response is fresh while it remains within the freshness lifetime set by the cache policy. That state does not prove that the origin still has the same content. Cache-Control directives determine when a stored response needs validation before reuse. The no-cache directive requires validation before reuse, while no-store prohibits storing the response. ETag and Last-Modified can be used to check whether a copy has changed; a 304 Not Modified response lets the cache reuse the stored body. Check that the origin's validators change when the content changes, so an incorrect 304 does not keep an old copy in use.

Protect personalized responses. If a shared CDN cache sends one person's account content to another, treat the problem as a data exposure. Stop sharing those responses, remove the exposed cached copies, and correct the cache policy before restoring caching. Do not copy real cookies or tokens into incident notes or public test commands.

Purge the Affected Content in Cloudflare

For an ordinary URL-based entry, select the correct site in the Cloudflare dashboard and open the caching Configuration page. Under Purge Cache, choose Custom Purge, then URL. Enter the complete URL, including the query parameters needed for the cached version, review the entries, and select Purge. Use the URL visitors request, including its original path if a Transform Rule rewrites that path internally.

Preserve the path's letter case and use UTF-8 URL encoding where needed. A wildcard is not supported in a single-file purge. If several files need removal, choose a supported URL list, tag, or prefix that covers those files without clearing unrelated content.

A cache key containing request headers or cookies may require values that the URL form cannot supply. For keys configured through Cache Rules, an API purge can include the matching values; a missing value is treated as empty, so omission can target the wrong variant. Enterprise zones can specify device type and country in the dashboard's advanced URL purge controls. Where a URL purge cannot select the required copies, use a suitable tag or prefix purge and review what that selection includes.

A cached redirect is separate from the response at its destination. Purging the redirecting URL removes the stored redirect, not the destination's cached content. Follow the chain and purge the destination URL if that is where the old content lives. For resized or otherwise transformed images, check which original URL and variants the provider's purge operation covers.

Verify the Content after the Purge

A successful Cloudflare API purge response confirms receipt of the request, not that a matching object was present or removed. Request the affected asset afterward and inspect its content version and cache status. If a cache miss still returns the old content, compare that response with the origin and any upstream cache. A later cache hit containing the intended version is consistent with the CDN storing the updated response. Check the actual content as well as the status; a status label alone does not identify the file version.

Repeat the check for variants the site actually serves, such as different image sizes, languages, and signed-in or signed-out responses. Use the relevant query parameters and request headers so the test reaches the same cached copy as the affected visit. Confirm that no private response is being shared. If an object is served through several hostnames, verify the hostname used by visitors; purging one URL does not necessarily cover another key.

Test Browser State and Prevent Recurrence

Once the CDN returns the intended version, check a normal browser session. If the browser still displays the old content, inspect its local cache or service-worker storage separately. A CDN purge cannot remotely erase a browser's stored file. For assets cached for a long time, publish a new filename when the content changes and update the pages that reference it. Keep the previous files available while older pages may still request them.

Record which cache held the old response, the affected URL and variant, the origin version, the purge time and method, and the content returned afterward. Revisit the publishing process if this problem recurs: verify that the origin update completes before the purge and that cache keys match the site's content variations.