One Response

  1. Caspar Hübinger
    Caspar Hübinger August 18, 2017 at 03:51 | | Reply

    There is another measure you can take to increase performance quite a bit. It is not applicable on all WooCommerce websites, but here’s a quick walk-through how you can determine if it is on yours.

    WooCommerce adds a default AJAX request for the cart widget to your site. You can find it at: [your-home-URL]/?wc-ajax=get_refreshed_fragments

    That AJAX request, like pretty much all admin AJAX requests, tends to slow down load times, so here’s what you can do about it:

    1. Open your WooCommerce site in your browser and check the HTML source code for a div (or other element) with the class of widget_shopping_cart_content.

    You might find inline CSS referencing that class, like .widget_shopping_cart_content {/* whatever */}, but the thing you’re looking for is an actual HTML element using that class name, like:
    <div class="widget_shopping_cart_content">

    2. If you don’t find any trace of widget_shopping_cart_content being used as a class attribute on any HTML element on your site (and ONLY then!), install this plugin to remove the unnecessary AJAX request:

    For insight on impact, measure load times (not performance grade) before and after.

Leave a Reply