• Resolved gabyrau

    (@gabyrau)


    How can I exclude headers and footer from caching? E.G. I use a function showing the total number of products currently in a (Woocommerce) cart beside the cart icon in the header of page. But updating the number of products in the cart does not update the number if you switch to another page.

    The same appears to widgets in the footer area: adding or changing any widgets is not shown unless I disable the whole plugin.

    I’m not familiar with Litespeed plugin – it was installed by my hoster. So any hint will be very appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter gabyrau

    (@gabyrau)

    For the Woocommerce problem with not updating the number of products in the cart, I meanwhile found the solution in another ticket.

    But still widgets in a html footer are cached and not updated. Though these widgets are not going to be changed very often the workaround of disabling and re-enabling the plugin could do the job for me. Any hint how to solve this in a better way will be very much appreciated.

    Rumi

    (@raaec)

    Hi,
    Ideally you should search for the footer cookie created by Woocommerce, and likewise exclude it. Perhaps by going to Cache > Woocommerce > Product Update Interval, and selecting “Always purge both product and categories on changes to the quantity or stock status.” might solve your problem.
    What is the domain in question? We can take a look for you.

    Regards

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    there are 2 ways to this case

    1. create a cache vary based on cookie , if I recall correctly , when you add something into the cart, Woo will set a cookie , this one you can use , but it will make cache less efficient

    2. another way , assuming you are using LiteSpeed Enterprise , you can convert that “product number ” to ESI block but this case, it requires some custom code work though

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to exclude WordPress (Woocommerce) Headers and Footers from caching’ is closed to new replies.