Use the code PERFMATTERS for 10% off!

Disable WooCommerce cart fragments AJAX (wc-ajax=get_refreshed_fragments)

WooCommerce sites, especially large ones, almost always encounter load time issues with the following AJAX request.

https://domain.com/?wc-ajax=get_refreshed_fragments

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.

wc-ajax=get_refreshed_fragments
wc-ajax=get_refreshed_fragments

Disable WooCommerce cart fragments

To disable WooCommerce carts fragments follow the steps below.

Step 1

Click into the Perfmatters plugin settings.

Perfmatters plugin settings
Perfmatters plugin settings

Step 2

Under the “Options” tab click on the “WooCommerce” sub-navigation menu.

Perfmatters WooCommerce options
Perfmatters WooCommerce options

Step 3

Toggle on “Disable Cart Fragmentation.”

Disable WooCommerce cart fragments
Disable WooCommerce cart fragments

Step 4

Scroll down and click “Save Changes.”

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.

Was this article helpful?

Related Articles