Opens in a new tab

Save $50 Every Year with MainWP

Get $50 off the MainWP Yearly Plan this Black Friday. Your discount renews every year! Claim Your $50 Discount
← Back to blog

How to Optimize the Cart Fragments Request in WooCommerce

This post may contain affiliate links. Read the disclosure.
How to Optimize the Cart Fragments Request in WooCommerce

In WooCommerce, the “get refreshed fragments request” is used for updating the mini cart in the header of the site, and the request from WooCommerce can be slow.

WooCommerce Plugin

The request in WooCommerce will show as being;

?wc-ajax=get_refreshed_fragments

Some caching plugins have built-in solutions for optimizing the “get refreshed fragments request” from WooCommerce, such as WP Rocket and Swift Performance.

The WP Rocket plugin will optimize the AJAX get_refreshed_fragments request, improving your WooCommerce store’s performance.

While the Swift Performance plugin has an advanced view option to cache the empty mini cart. If you run into issues using the WP Rocket plugin with the mini cart being cached, then you can use the helper plugin to disable it.

Using either of the built-in features in WP Rocket or Swift Performance plugin will help optimize your site’s cart fragment requests in WooCommerce.

Useful Links

Explore MainWP Pro
Get MainWP Pro
Topics: Tips & Tricks