Skip to content

Cloudflare Development Mode: what it bypasses, what it does not, and the 3-hour timer

Development Mode makes the Cloudflare edge stop serving cached copies so you can see origin changes immediately. It does not purge anything, does not touch browser caches, and turns itself off after three hours. Here is how to use it without the usual surprises.

Development Mode is a zone-wide switch that tells Cloudflare’s edge to stop answering from cache while you iterate on CSS, JavaScript, and images — requests flow to the origin and you see changes as you save them. What it is not: a purge, a browser-cache bypass, or a fix for stale plugin caches. And it re-arms itself: after three hours it switches off automatically, and any edge copies cached before you enabled it are still there, unpurged, ready to serve again.

What’s happening

Three cache layers sit between your editor and your eyes: the browser cache, Cloudflare’s edge cache, and any caches at the origin (page-cache plugins, server caches). Cloudflare’s edge holds static extensions by default — CSS, JS, images, fonts, not HTML — which is exactly the layer that makes front-end iteration maddening: you upload a new stylesheet and the edge keeps serving the old one until its TTL expires.

Development Mode suspends that one layer. While it is on, the edge stops serving cached copies for the zone and passes requests through to the origin. It does not delete anything: the cached objects stay stored with their TTLs ticking. It does not change what your visitors’ browsers hold, it does not slow or stop any origin-side cache, and it leaves security features (WAF, DDoS protection, rate limiting) running untouched. Worker-generated responses are also outside its reach — a Worker that answers from its own cache keeps doing so.

The timer is the part everyone forgets. Development Mode disables itself after three hours. If you never purged, edge entries cached before your session — still within TTL — come back into service, and the site appears to “revert”. It never reverted; the old cache just woke up.

What to check first

  • Is the fix you need actually a purge? If production is showing stale content to users, purge the URLs — Development Mode only stops future cache serving while it is on.
  • Is your own browser the stale layer? DevTools open with “Disable cache” checked is mandatory during front-end work; no Cloudflare setting reaches your local cache.
  • Is there a cache behind the origin? LiteSpeed, a WordPress page-cache plugin, or Varnish will keep serving old copies to the edge no matter what Cloudflare bypasses.

How to verify

Confirm the edge is actually passing through — the HIT/age pair should disappear:

curl -sI https://example.com/css/site.css | grep -iE '^(cf-cache-status|age|cache-control)'

With Development Mode off and the file hot, you see HIT plus an age. With it on, the status stops reading HIT and age drops away. Prove the origin is serving your latest change with a cache-busting query (which skips every HTTP cache key) and against the origin directly:

curl -s "https://example.com/css/site.css?dev=$(date +%s)" | head -3
curl -s https://example.com/css/site.css --resolve example.com:443:203.0.113.10 | head -3

Check the toggle state and remaining time from the API:

curl -s -H "Authorization: Bearer $CF_API_TOKEN" \
  "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/development_mode" \
  | jq '.result | {value, time_remaining}'

The fix

Using Development Mode without the classic surprises:

  1. Turn it on deliberately. Caching → Configuration → Development Mode, or the API setting above. Note the time — the three-hour timer starts now.
  2. Kill the other layers for your own session. DevTools open, “Disable cache” checked, or test with curl so the browser is out of the equation entirely.
  3. Iterate. Origin changes should appear on refresh. If they do not, the stale layer is your browser or an origin-side cache — Development Mode has done its part.
  4. Turn it off when done — do not wait out the timer. Every minute it is on, the zone runs with no edge offload; on a busy site that is measurable origin load.
  5. Purge the files you changed. This is the non-obvious step: entries cached before your session are still stored. Purge by URL for the touched assets (or Purge Everything on a small zone) so the pre-session copies never resurface. Purge selection trade-offs are in Cloudflare cache purge strategies.
  6. For anything longer than an afternoon, use a scoped rule instead. A Cache Rule with “Bypass cache” on a staging hostname or a path prefix gives you a permanent, targeted bypass without switching off caching for the whole zone.

When this fix is wrong

Development Mode is the wrong tool when users are seeing stale production content (purge, and fix TTLs), when only you see stale content (your browser cache), when HTML is the stale part on a default setup (Cloudflare was never caching it — DYNAMIC — so the problem is an origin cache), and when the workflow is a daily one (a bypass Cache Rule or a dev hostname running grey-cloud beats re-toggling a zone-wide switch every morning).

Common mistakes

  • Expecting Development Mode to purge — it never removes anything.
  • Blaming Cloudflare when the browser cache serves the old file mid-session.
  • Leaving it on and letting the timer, not a decision, end the bypass — with pre-session cache coming back unannounced.
  • Enabling it on a production zone during a traffic peak and feeding the full request volume to the origin.
  • Using it to “fix” stale content after a deploy instead of building a purge step into the deploy itself.

Prevention

Make Development Mode a dev-window tool, not a troubleshooting habit: the statuses that actually diagnose staleness are in decoding cf-cache-status. Pair every session with an exit purge of touched files, keep staging on its own hostname with caching bypassed by rule, and let the official cache documentation settle any doubt about what the toggle covers.

A three-hour pass-through with no purge attached solves exactly one problem — seeing your work — and it should be scoped that way. Cache layers that fight each other cost real revenue — Stack Harbor tunes the whole stack, edge to origin, under Managed Cloud Ops; book an infrastructure review.