AdminsForum

Cloudflare

Guide Purge One URL in Cloudflare and Verify the Updated File

Started by ALEX 0 replies 250 views
1ALEX
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#1
cloudflare purge url adminsforum   
Cloudflare still showing an old CSS file or image? First verify that your origin has the new file. Then purge that one asset and compare its contents. Purging cannot repair an origin that still serves the wrong version.

1. Confirm what changed
We used a disposable public CSS URL: https://alias-lab.adminslab.com/cache-lab.css. It contained a visible v1 comment. After updating only that lab response to v2, the direct origin served v2 while Cloudflare still returned HIT, Age: 67 and v1 at 14:43:20 UTC on 19 October 2026. This gave us a reproducible stale-file example.

Use your deployment check or a trusted direct-origin request to confirm the update. For HTTPS diagnostics on a server you manage:
Code:
curl --resolve YOUR-HOST.example:443:YOUR-ORIGIN-IP https://YOUR-HOST.example/style.css
Replace all placeholders. --resolve routes only this request to the named IP while retaining the real hostname for HTTP and certificate validation. Do not disable TLS validation. Some origins deliberately accept only Cloudflare traffic; use an authorized deployment check instead if direct access is blocked.

2. Open the right zone
Sign into Cloudflare and select the domain that owns your asset hostname. Open Caching, then Configuration. In Purge Cache select Custom Purge. Our lab showed Standard caching, Development Mode off and Browser Cache TTL four hours; we did not alter those settings.

3. Select URL and enter the exact asset
Choose URL. Paste the full HTTPS address, including its case-sensitive path and relevant query string. One URL per line. Review the hostname carefully. In this test we entered only:
Code:
https://alias-lab.adminslab.com/cache-lab.css
Select Purge. We did not use Purge Everything. The GIF includes the actual lab form between two labelled evidence summaries.

4. Verify the new body, not only the dashboard
Request the same URL from a fresh command-line client:
Code:
curl -sS -D - https://YOUR-HOST.example/style.css
This prints both response headers and body. Repeat the identical request shortly afterward. Our post-purge results were:
Code:
14:43:43 UTC HTTP 200 MISS public fixture v2 14:43:45 UTC HTTP 200 HIT Age: 2 public fixture v2
The changed comment established that Cloudflare fetched the updated origin response. These were server-side requests through the SOF edge; we did not test every region or a logged-in application.

5. If a browser still shows the old design
A CDN purge does not remove a file already stored in a visitor's browser. Our zone instructed browsers to cache this response for four hours. Diagnose with developer tools and a network reload; also check application caches and service workers. For repeatable deployments, publish assets with a changed versioned filename and update the HTML references rather than relying on every visitor clearing a cache.

If the purge seems ineffective
Confirm the final asset URL rather than its redirect, the correct zone, and the actual origin body. A successful purge followed by another old response can mean the origin or an upstream application cache still serves old content. Custom cache keys and special request headers can require a different purge approach; wildcard matching is not a single-URL purge feature. Do not clear the entire zone merely to hide an unresolved URL mismatch.

Scope and recovery
Only the disposable public CSS entry was purged. Other sites, mail and administrative access were untouched. Purging evicts a cached copy; it does not delete the origin file. New requests can refill the cache and briefly increase origin work. The v2 fixture remains available for later lessons, and the root test page remains no-store.

Reference: Cloudflare single-file purge documentation. No browser-cache clearing, custom-key purge or global performance test is claimed.

Prerequisite: Check Cloudflare cache status.
Reply
Possibly Related Threads…matched by title
Replies:0Views:179
Replies:0Views:174
Replies:0Views:174
Replies:0Views:173
Replies:0Views:204

Users browsing this thread: 1 Guest(s)
Forum Jump: