• Resolved dennyh00w

    (@dennyh00w)


    I’m having an issue with cache for the Cart icon on my Woo environment and AJAX method – built with Divi BodyCommerce.

    All Ajax settings for the cart and mini-cart are set on, yet the WP Optimize page cache is enabled. This is great for improving load times on pages, but I can’t seem to lock out the cart from being cached.

    Please visit https://artivin.be and afterwards go through some pages so caching will take into effect and you will see the loading of a page improve significantly. Then you can go to the shop page and add a product to the cart, which will enable the minicart pop-up and the cart in the menu above to have 1 added article.

    Yet, if you move back to another page that was already visited (f.e. home) that will be shown in cache version, the cart in the menu is back on 0 items again and the mini cart is empty.

    Is there a workaround for this? To still have the ability to cache pages but to exclude the cart in the menu? How do you handle caching of dynamic elements such as this one?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hello

    You should be able to exclude the AJAX cart files from being cached in WP-Optimize > Cache > Advanced settings > URLs to exclude from caching.

    • This reply was modified 1 year, 5 months ago by pbevanudp.
Viewing 1 replies (of 1 total)
  • The topic ‘Excluding caching on dynamic element such as cart icon with ajax’ is closed to new replies.