• I m confused about the Integration of W3 total cache and Cloudfare with woocommerce.I have woo-commerce plugin installed. I was having problem with product not being deleted from cart. I have the following questions.
    1. Should I add any page rule in cloudfare for caching HTML file in wordpress ( *.example.com* = cache everything ). I heard HTML by default is not cached in cloudfare!!
    2. Should I add any exception in page rule for woocommerce page in CloudFare ? (excluding cart,checkout page etc from being cached)
    3. What should I put for “Browser Cache Expiration” in cloudfare ?

    I have excluded woocomemrce cart,my-account & checkout page in Page Cache. I m getting the following header in browser :
    cache-control:no-cache, must-revalidate, max-age=0
    cf-cache-status:MISS

    What setting should I use for optimizing my scenario ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Ben

    (@benbornschein)

    I heard HTML by default is not cached in cloudfare!!

    It’s not recommended to save HTML in a CDN, but just my two cents…

    Should I add any exception in page rule for woocommerce page in CloudFare ? (excluding cart,checkout page etc from being cached)

    Yes and for W3 Total Cache as well.

    Cart and checkout should not be cached. Sometimes it is also useful not to cache any page of WooCommerce, but this depends on how you setup your WordPress and theme.

    Thread Starter tvrhossain

    (@tvrhossain)

    Hello, thnk u very much.

    1. I found that after HTML caching , my site got much faster, r u telling me to disable that ? if it complicates something later, I will.

    2. I use Cloudfare Free version. Hence, I can only add 3 page rules.Which of the most IMPORTANT three u recommend for woocommrece site. Currently I have this page rules here

    3.I have excluded cart,my-account and checkout from being cache in W3 total cache setting on my site (Page Cache>Never cache the following pages). Isnt this enough?

    4. I disabled Minify in W3 Total cache and enabled it in Cloudfare.

    Ben

    (@benbornschein)

    1. I found that after HTML caching , my site got much faster, r u telling me to disable that ? if it complicates something later, I will.

    HTML caching on your site is okay but don’t use a CDN to cache your cached html files. Use the CDN to cache your images, videos, css, and javascript.

    2. I use Cloudfare Free version. Hence, I can only add 3 page rules.Which of the most IMPORTANT three u recommend for woocommrece site. Currently I have this page rules here

    You don’t have to add these rules for your checkout and cart. Just tell W3 Total cache that you don’t want to cache these pages on your site and tell Cloudflare not to cache html files.

    3.I have excluded cart,my-account and checkout from being cache in W3 total cache setting on my site (Page Cache>Never cache the following pages). Isnt this enough?

    Yes this should work. Do you have a part on your site where you show how many items you currently have in your cart?

    Thread Starter tvrhossain

    (@tvrhossain)

    Thank you very much for the reply.

    HTML caching on your site is okay but don’t use a CDN to cache your cached html files. Use the CDN to cache your images, videos, css, and javascript.

    Do u mean that I should I delete these rules in cloudfare, as in here . I think the 2nd rule is caching HTML ( *example.com/*). Does cloudfare by default cache images or I have to set a rule for that, if so, what rule ? (I use jetpack photon as well)

    ..cache your cached html files..

    This is confusing. R u telling me that if I set a rule in cloudfare for caching everything , it will cache the users agent cache again ? !!

    Do you have a part on your site where you show how many items you currently have in your cart?

    yes, there is part where it shows how many items are added in cart dynamically.It used to have problems with updating but got fixed after I added “cache exception” in W3 total cache for page.

    Thread Starter tvrhossain

    (@tvrhossain)

    Hello, I have just discovered a serious issue. I have enabled ‘GeoLocate with page cache support’ in woocommerce. If this is enabled, I CANT exclude cart,checkout,my-account page in W3 Total cache, so I think.I m having a weird problem. After I add TWO/few products in my cart and delete any one,all the products disappear at once. Then if I refresh the cart page, I find the other one/s. It happens every time I delete any one, the refresh to get the others back again. What do I do now ??
    I m in serious trouble. I was gonna put the site live today !!!

    Hi tvrhossain!

    Did you find any working soultion for your problem?
    I ave the same issue. If i delete a product from the cart after page refresh i see the same amount product in the cart. Only if i go to the chechout page than i can see the right amount.

    What can be the solution?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cloudfare setting for W3 Total Cache & WooCommerce’ is closed to new replies.