NextWoo
Glossary

Cart fragments

The WooCommerce request that keeps the header cart count and mini-cart up to date.

What it is

Cart fragments are an AJAX request (/?wc-ajax=get_refreshed_fragments) that WooCommerce uses to refresh the mini-cart without reloading the page. The result is kept in the browser's sessionStorage, so it does not fire on every view. Since WooCommerce 7.8 the script loads only where the Cart widget is rendered, but many themes still put that widget in the header of every page.

Why it costs you money

Each request bypasses the page cache and runs WooCommerce in PHP, so on a busy store with a header cart it is a steady stream of uncached work, and the script competes for the main thread while the page is becoming interactive.

How to check it yourself

Watch the network panel on a product page for a request containing wc-ajax=get_refreshed_fragments. If it fires where no cart is shown, it can usually be scoped to the templates that need it.