Why Does a CDN Break Dynamic WooCommerce Content?
Why This Happens
CDNs like Cloudflare are built to cache and serve content from edge servers close to each visitor, which is excellent for genuinely static assets and pages, but requires explicit configuration to distinguish WooCommerce's dynamic, per-customer pages from the rest of the site. Without that distinction, the CDN treats everything the same way, which for cart, checkout, and account pages is exactly the wrong behavior.
Common Causes
- No explicit cache-bypass rules configured for cart, checkout, and My Account URLs, leaving the CDN's default page-caching behavior to apply uniformly across the whole site.
- A CDN caching AJAX/API endpoints WooCommerce relies on for dynamic functionality (updating totals, checking stock), causing stale or incorrect responses to those background requests.
- Cookie-based personalization not being respected by the CDN's caching logic, if the CDN isn't configured to vary its cache based on the presence of a session cookie.
- Not using WooCommerce-specific CDN integration guidance, since major CDN providers generally publish specific recommended configurations for WooCommerce that address these exact issues, worth following directly rather than relying on generic caching defaults.
How to Configure This Properly
- Create explicit cache-bypass (page rules or equivalent) for cart, checkout, and My Account URLs at the CDN level, ensuring these always pass through to the origin server fresh.
- Follow the CDN provider's specific WooCommerce configuration guidance if published, rather than relying on generic default settings.
- Test as two separate customer sessions (a normal browser and a private window) to confirm dynamic pages genuinely show independent, correct content for each.
- Confirm AJAX/API endpoints used for checkout totals and stock checks are also excluded from caching.
Need CDN configuration fixed or set up properly for WooCommerce? See WooCommerce fixes.