Cloudflare only caches static assets such as CSS, JS, and image files. As a security measure, Cloudflare does not cache HTML by default. WordPress and other CMS-based sites are dynamic in the sense that they require administration in a secure server environment. With HTML caching enabled, these secure server pages will be cached and will be visible to any user logged in or out.
cloudflare creation
Cloudflare allows you to customize all caching settings by adding a site-wide wildcard page rule: *kinstalife.com/* With "cache everything" enabled, Cloudflare will cache your site's HTML pages across its entire network of data centers around the world.
report
Image description: Site with everything ghana whatsapp number data cached enabled - note the cf-cache-status header.
In general, we don't recommend configuring Cloudflare to cache everything unless your site is static. For example, most sites created by static site generators like Gatsby and Hugo don't have dynamic features that can be broken by full-page caching.
How to bypass cookie cache?
That being said, you can certainly configure Cloudflare settings to cache everything on your WordPress site. Cloudflare's Business plan allows you to create page rules that bypass the cache for certain cookies.
By changing Cloudflare settings to bypass the WordPress cookie, incoming requests will not be cached. Similarly, bypassing the cache for cookies such as woocommerce_items_in_cart and wp_woocommerce_session_ is useful for WooCommerce sites.
Another option for selectively bypassing Cloudflare's cache is to use PHP to add cache control response headers when a certain condition is met. For this method to work, you need to enable origin caching control in your "cache all" page rule.
cache
Specifying Cache-Control headers
-
- Posts: 131
- Joined: Mon Dec 23, 2024 3:28 am