Disable Cart Fragments by Optimocha

The Disable Cart Fragments plugin is one of those WordPress plugins that will go unnoticed by the majority of WordPress users but, to anyone who runs an online store using WooCommerce, this extension will be indispensable.

So why will this plugin be indispensable for anyone using WooCommerce? Because it solves a problem that every WooCommerce shop owner faces … and it solves the problem for free.

The Problem
Whenever anyone … a new visitor, a returning customer, Google’s spider or even a speed bot … lands on the front page of a WooCommerce store WooCommerce looks for any evidence that the person … or bot … visiting the site has left and item or items in their shopping cart on their last visit.

The visitor might never have visited the site before or put anything in their shopping cart but WooCommerce will still search to see if the visitor left something in the cart,

It searches very slowly and the page doesn’t load until WooCommerce has completed it’s search.

You really only spot the problem when you start using a tool like GTmetrix to try and discover why the site loads so slowly.

Using GTmetrix and going to the Waterfall report you will see how and when everything that goes to making the page actually loads and tucked away in the line entries will be something that looks like this:

It’s full title looks like this:

At first glance it doesn’t look like much but look at the figure in the far-right column. In this case it took 2.69 seconds to load and, while other things loaded around it, there was still a large chunk of time taken up just for this one item.

And the solution is …
Disable Cart Fragments by Optimocha!

There are no settings to worry about. Simply install it … activate it … and the plugin will:

  • Disable WooCommerce cart fragments.
  • Check the cart cookies and if it’s not empty, loads the cart fragments script so the cart totals are still updated.

So returning visitors who have left something in the cart on a previous visit will get the script loading behind the scenes but everyone else will get a page that loads faster.

How much faster?
Well that depends on your website but on the last time I installed this plugin I knocked a whole second off the loading time. That may not sound like much but when you celebrate clawing back a few milliseconds saving a whole second can be a huge win.

Leave a Comment