• Resolved Megunticook

    (@megunticook)


    Is it recommended to avoid browser cache with woo commerce or can you safely use it? Do you need to exclude certain pages using the “Prevent Caching Exeption List” field? Any advice appreciated, thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @megunticook

    Thank you for reaching out and I am happy to help.
    In general- no. The Browser Cache is something that happens on the clients end. So the users browser. If you excluded the pages that should not be cached form the page cache like cart. accout, etc, you can safely use the browser caching.
    If you however have the login/logout option that may not be working i.e. showing logged out and vice versa, in this case you should disable cache control header and expires header for HTML&XML.

    Thanks!

    Thread Starter Megunticook

    (@megunticook)

    Thanks for your prompt reply. Let me make sure I understand you correctly.

    Are you saying it’s OK to use the browser cache option in W3TC with WooCommerce if you exclude any pages you don’t want the user’s browser to cache?

    And to exclude pages I should use the “Prevent Caching Exeption List” in the W3TC browser cache settings?

    Not sure I follow your second point about “the login/logout option that may not be working”–are you saying browser cache might cause issues for logged in users? And the fix for this is to disable cache control header as well as expires header for HTML and XML?

    What about the dynamic WooCommerce pages, like a product archive for example. Should these be excluded from browser caching?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @megunticook

    Yes, it’s ok to use browser Cache with woocomerce

    Prevent caching exception list is used as a counter option for Prevent caching of objects after settings change
    So it’s not for exluding URl’s from BC.

    As for the login/logout, this may happen with some plugins, so you do not have to worry about that if you are not experiencing problems.

    The dynamic WooCommerce pages do not have problems with Browser Caching. So there should be no issues with this.

    Thanks!

    Thread Starter Megunticook

    (@megunticook)

    Thanks…so there’s no place in the BC settings to specify pages to exclude. Where should I specify pages to exclude for BC?

    So you say dynamic WooCommerce pages “do not have problems with browser caching” — do you mean W3TC doesn’t cache these pages by default? According to Woo documentation, you need to exclude /cart/, /my-account/, and /checkout/ from browser cache. Will W3TC avoid caching those pages without me having to specify?

    Thank you.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @megunticook

    You cannot exclude pages from Browser Caching, as this is a global setting.
    As per Woocommerce documentation, you should exclude the pages with sensitive data /cart/, /my-account/, and /checkout/ from Page Caching. Since the pages are not cached, the users will not fetch cached pages, and with the browser cache enabled, this is only cached on their end.
    You need to specify all pages that you do not want to cache, but you should exclude them from Page Caching.

    Thanks!

    Thread Starter Megunticook

    (@megunticook)

    Thanks for explaining in more detail. Sorry but I need to just clarify one point: let’s say I exclude /cart/ from page caching. A visitor browses to /cart/ and gets a fresh version of /cart/ from my web server origin. Do I need to worry about their browser caching /cart/ if I have browser cache enabled in W3TC? Obviously that would be a problem. I suppose I could add a “no cache” to that specific URL in my NGINX configuration. I’m just not clear if that’s necessary.

    I apologize for beating a dead horse here but I just want to make sure I thoroughly understand this.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @megunticook

    Sorry for the late reply. If you exclude /cart/ from page caching you do not need to worry about the browser caching when it comes to those pages. Any changes will reflect immediately and the user will see any updates in the cart with the Browser Cache enabled.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘browser cache and woo commerce’ is closed to new replies.