Guides Guides 6 min read 1,089 words

Cloudflare Browser Cache TTL: Set It Without Stale Files

Set Cloudflare Browser Cache TTL with the right origin headers. Understand browser versus edge caching, verify responses, and avoid stale asset problems.

Cloudflare Browser Cache TTL controls the cache lifetime communicated to visitors' browsers for affected resources. To change it, open your website's Caching configuration and choose a value under Browser Cache TTL. Before doing that, decide whether Cloudflare should adjust the lifetime or respect the origin's existing cache headers.

This is not the same as Cloudflare's edge cache lifetime. More importantly, purging Cloudflare does not remove copies already stored in visitors' browsers. We explain the distinction first, because a longer lifetime is only useful when your update process can handle it.

Browser TTL and edge TTL control different copies

A browser cache is stored on the visitor's device. An edge cache is stored in Cloudflare's network. Browser Cache TTL concerns the former; Edge Cache TTL concerns the latter. A resource can have different lifetimes at these layers, so avoid referring to both as simply “the Cloudflare cache.”

Fresh browser-cached resources can be reused without downloading the entire response again. Once stale, a resource may be revalidated depending on its cache policy and validators. Expiration does not necessarily mean that every byte must be downloaded again on the next request.

For background, read our explanation of web caching and the Cloudflare cache guide. Those concepts help separate a browser still using an old stylesheet from an edge server still serving an old response.

How the setting interacts with origin headers

Cloudflare documents that it normally honors expiration supplied through Cache-Control and Expires. The dashboard's Browser Cache TTL can override a shorter origin lifetime or supply a lifetime when the origin does not send the relevant headers. Think of the numeric setting as something that can extend browser caching, not a universal command to shorten every existing policy.

Respect Existing Headers tells Cloudflare to honor the origin Cache-Control settings rather than generally inserting or overriding them through this zone setting. Cloudflare notes that a specific Cache Rule can also affect the result. Review such rules when the observed response differs from your expectation.

Cloudflare lists a default Browser Cache TTL of four hours in its current reference. That describes a documented default, not a recommendation for every website. The right choice depends on the actual resource policy and how you publish changes, not just the site's overall traffic.

Browser cache is on the visitor device; edge cache is in Cloudflare. A Cloudflare purge does not clear browser copies.
Conceptual illustration, not a dashboard screenshot or a configuration test. Based on Cloudflare documentation checked 13 November 2026. Source: https://developers.cloudflare.com/cache/how-to/edge-browser-cache-ttl/set-browser-ttl/

Change Browser Cache TTL step by step

  1. Sign in to Cloudflare and select the website whose resources you intend to change.
  2. Confirm the relevant website hostname is proxied. Our Cloudflare proxy guide explains why DNS-only traffic does not receive the same HTTP processing.
  3. Open Caching and its Configuration page.
  4. Find Browser Cache TTL.
  5. Choose the intended expiration value from the drop-down, or select Respect Existing Headers if the origin should remain responsible for the policy.
  6. Request representative resource URLs again and inspect the headers delivered publicly. Do not consider the dashboard selection alone proof of the final policy.

Write down the previous value and any related rule before changing it. If the resulting policy is unsuitable, you can return to the same control and restore that configuration. However, an already-fresh browser copy may not contact the server immediately to learn about the corrected policy.

Choose lifetimes by resource type

We recommend starting with the origin's intended policies instead of applying a long duration indiscriminately. Content that changes at a stable URL needs a different deployment strategy from an immutable asset whose URL changes with its content. A single zone-wide value cannot express every distinction well.

MDN describes versioned or hashed resource URLs as a way to use long cache lifetimes while allowing an updated page to reference a new asset. For example, publishing a changed stylesheet under a new versioned URL avoids asking the browser to treat the old URL's fresh cached response as though it had changed.

That does not mean changing URLs on every request. The purpose is a stable URL for a particular version, with a new URL when the content changes. Keep the publishing process consistent so that HTML actually references the new asset when you release it.

Personalized and sensitive responses require appropriate cache controls of their own. Do not make a broad caching change based solely on a successful static-image test. Review which responses are affected and preserve the application's intended privacy and freshness behavior.

Verify what the browser receives

Use the browser network panel and inspect an actual response for an image, stylesheet, or script. Record Cache-Control and Expires where present. If testing a newly changed server policy, disable local caching for that diagnostic request so you inspect a response rather than only a previously stored copy.

Then test a normal repeat visit separately to understand reuse. Keep that separate from the cache-disabled diagnostic test: those two situations answer different questions. A fresh network response tells you the current policy; a repeat visit shows how an existing browser copy behaves.

Compare the public response with your origin configuration and any Cache Rules. If a high origin max-age remains in effect, selecting a lower zone value should not be treated as proof that all browsers now have a shorter lifetime. Cloudflare's documented interaction can preserve the longer origin lifetime.

Fixing stale files without confusing the layers

If an updated stylesheet or image is missing, identify which layer contains the old copy before taking action. A Cloudflare cache purge can address an edge copy, but Cloudflare explicitly says it does not affect assets stored in a visitor's browser.

For already-fresh browser resources, a versioned asset URL is a more dependable publishing strategy than expecting an edge purge to recall every browser copy. A hard refresh may help you diagnose your own browser, but it is not a deployment mechanism for every visitor.

If Apache controls your origin headers, our browser caching with .htaccess guide explains that configuration layer. Keep its policy aligned with Cloudflare rather than editing both independently without inspecting the result. Our domain lookup tool can help with registration context during a wider site review, but it does not inspect browser caches.

Browser cache TTL FAQ

Does purging Cloudflare clear every browser?

No. Edge cache purges and browser storage are separate.

Is the longest available value always best?

No. Consider resource updates, versioned URLs, and existing origin policy before extending the lifetime.

Does this setting control DNS caching?

No. This guide concerns HTTP resources in browsers, not the TTL of DNS records.

Sources