• Resolved sy19

    (@sy19)


    Hello there
    I was just wondering if Woocommerce works with ‘Leverage Browser Caching/Add Expires headers’. Is using this going to cause issues with the shop pages, product pages etc. Especially as we add new products almost daily.

    Thanks for your help
    Simon

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey Simon,

    That’s a good thing to think about. Setting these up should be fine for your store. The expires headers will tell the browser how long to hang on to a file like an external CSS, JavaScript or image file. Adding new products won’t be affected by the expires headers unless you need to make modifications to those files too. That’s not the typical workflow in WooCommerce so you should be fine.

    As you’re working with these optimization issues, we typically see the most trouble come from browser caching not being set up for WooCommerce. We have a document for working with that here:

    https://docs.woocommerce.com/document/configuring-caching-plugins/

    If you have any questions, let me know.

    Cheers,

    Thread Starter sy19

    (@sy19)

    Hi @3sonsdevelopment
    Thanks for your reply, I’l get this implemented.

    If I need to update images etc do I just clear my cache and this will clear the leverage cache or do I have to do something more in depth? I have tried to find an answer to this but it seems to be hard to find the answer.

    Thanks again
    Sy

    • This reply was modified 6 years, 9 months ago by sy19.

    Hey @sy19,

    That’s a great question. Since this works by caching information in the user’s web browser, they can get the new information by clearing out their cache. It’s hard to communicate that to users though.

    For changes made to files that have already been deployed, often people make a small change to the file name. That will cause the browser to download the new version. The nice thing about that is it happens automatically and you don’t have to ask the user to clear their cache.

    Cheers

    Thread Starter sy19

    (@sy19)

    HI @3sonsdevelopment
    Thanks for your answer, yes I thought this could be an issue. I guess we could change the time frame to be very short so the next time the customer visits it updates with the new information however this isn’t really feasible as we would have to rely on the customer coming back straight after we did the changes and then having the time frame set for a short period would mean they’d get no benefit from the caching. I guess best option is for me to not edit the damn site so much.

    Thanks again for your help, gives me a few things to think about.
    Sy

    Hey @sy19,

    You might look into using a plugin to automate this for you. That way you can set log expire headers but still make changes when you need to. I believe the Merge + Minify + Refresh plugin can do that I’m sure others can too. If you’re not using, you might consider testing one out on a staging site and see if it works for you.

    Good luck with it 🙂

    Thread Starter sy19

    (@sy19)

    Hello @3sonsdevelopment
    Cheers for the advice, I’ll look into this further.
    Have a good one.
    Sy

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

The topic ‘Leverage Browser Caching – Add Expires headers’ is closed to new replies.