Browser Cache TTL
By default, Cloudflare honors the cache expiration set in your
Cache-Control headers. Cloudflare overrides any
Expires headers with values set via the Browser Cache TTL option under Caching on your dashboard if:
- The value of the
Cache-Controlheader from the origin web server is less than the Browser Cache TTL setting. This means that Browser cache TTL value needs to be higher than origin
- The origin web server does not send a
Nevertheless, the value you set via Page Rule will be ignored if
Cache-Control: max-age is higher. In other words, you can override to make browsers cache longer than Cloudflare’s edge but not less.
Set Browser Cache TTL
The Cloudflare UI and API both prohibit setting Browser Cache TTL to 0 for non-Enterprise domains.
- Log in to your Cloudflare dashboard.
- Click Caching.
- Under Browser Cache TTL, click the drop-down menu to select the desired cache expiration time.
The Respect Existing Headers option tells Cloudflare to honor the settings in the
Cache-Control headers from your origin web server.