WooCommerce sites, especially large ones, almost always encounter load time issues with the following AJAX request.
Even on our small WooCommerce test site it took longer than any other request and wasn’t needed as this was on the homepage. On large sites, we have seen this account for up to 10-second delays. That’s right, 10 seconds.
Disable WooCommerce cart fragments
To disable WooCommerce carts fragments follow the steps below. Make sure you have WooCommerce installed and activated first.
Click into the Perfmatters plugin settings.
Make sure you’re on the “General” tab.
Scroll down to the “WooCommerce” section and toggle on “Disable Cart Fragmentation.”
Scroll down and click “Save Changes.”
Alternative: Delay cart fragments script
If you have any issues with the feature above due to your theme, an alternative is to simply delay the
Troubleshooting cart fragments
The cart fragments feature and or AJAX request in WooCommerce is used to update the cart total without refreshing the page. However, this definitely comes at a cost, and a lot of times depending upon your theme, isn’t even used or needed.
Some themes also allow you to change how your shopping cart works. So we’ve seen that some will use our Perfmatters feature to disable cart fragments and then change the shopping cart functionality with a theme option to get better results.
If your theme only has an option to turn the shopping cart on or off, another route we’ve seen that sometimes works is to turn it off and instead use a free plugin like WP Menu Cart for the shopping cart.