Changes to pages not appearing after enabling Cloudflare APO

  1. Home
  2. Knowledge Base
  3. Changes to pages not appearing after enabling Cloudflare APO

Issue:

We’ve seen increasing reports of old versions of pages still showing to users or changes to pages not showing up to visitors after Cloudflare’s APO service is enabled.

This issue seems more common with Woocommerce sites and sites with regular changes – e.g. pricing or promos or marketing elements that have an expiry time like promo banners still appear after the promo has ended.

Root Cause:

This problem appears to be a quirk of their APO service in conjunction with the caching settings whereby Cloudflare injects caching headers to tell the web browser to cache HTML pages for X time.

Typically we set this to 1 year which means in this scenario with APO enabled, the HTML pages would be cached on the device for 1 year. Unless a hard refresh is done (shift key + refresh) or the browser cache is cleared, in theory the browser may not show any changes for up to 1 year

The Fix:

The fix here is to set the Cloudflare Browser Cache TTL to “Respect Existing Headers” as per the screenshot below. With this setting the web hosting/caching plugin (eg WPRocket) browser cache settings are passed to the user instead of Cloudflare overwriting them.

Typically WPRocket is what we use for caching on Wordpress and it’s browser TTL settings are usually:

  • images – 4 months
  • favicon images – 1 month
  • XML/RSS – 1 hour
  • HTML – no caching
  • fonts – 4 months
  • CSS and JS – 1 year

This article on WPRocket’s website explains browser settings in more detail.

Was this article helpful?

Leave a comment