This article was originally published on this site

WooCommerce Cart Fragments have long presented a dilemma for eCommerce websites. 

On one hand, Cart Fragments provide needed cart functionality, including the critical “add to cart” action your customers use when selecting an item on your site.

On the other hand, Cart Fragments are AJAX requests that can quickly pile up, slow your site down, and ultimately cost you customers.   

Because of the complexity associated with the Cart Fragments script, disabling Cart Fragments altogether has historically been a common approach for solving this problem, even though many sites rely on the use of some Cart Fragments to maintain their shopping cart functionality. 

This all-or-nothing approach has left many WooCommerce users faced with a difficult dilemma, forcing them to choose between cart functionality and site stability and speed. That is, until now. 


Introducing WP Engine Live Cart

To remedy the challenge of managing Cart Fragments, WP Engine is excited to announce the launch of Live Cart, a proprietary performance feature now available with WP Engine’s eCommerce hosting plans that optimizes the WooCommerce Cart Fragments requests that make your cart dynamic, so they only run when they’re needed.

Check out the video below for more: 

Say goodbye to sacrificing cart functionality for stability and speed! Live Cart makes real-time updates to each visitor’s cart, without dragging down performance.


Wait, What Exactly Are Cart Fragments?

Because they operate behind the scenes (and often assist with ubiquitous cart functions), Cart Fragments can fly under the radar when you’re assessing the performance of your site. 

That said, top page performance testing tools such as Google PageSpeed Insights, Pingdom, and GTMetrix regularly highlight Cart Fragments requests as the source of page speed delays.

Although WooCommerce Cart Fragments are often relied on for important eCommerce cart functions, they can also slow down the rest of your site when not managed properly

Cart Fragments can be particularly thorny when it comes to site stability during high-traffic events, even when that’s 50 or more concurrent shoppers.

But that’s mainly because without any optimization, Cart Fragments requests are made all the time, even when completely unnecessary, including on pages without the add-to-cart functionality, like an About Us page or a blog post.


How Does Live Cart Improve Performance?

As noted above, the complexity of the Cart Fragments script has typically led to one of two approaches:

  • Using Cart Fragments to keep carts up to date but sacrificing the speed of other pages.
  • Disabling Cart Fragments to speed up your pages but leaving your cart widgets with stale and incorrect data (e.g., the wrong count of the products in the cart, the wrong total, or products not appearing to be added to the cart.)

Neither choice is ideal, and to finally provide a middle ground, WP Engine Live Cart leverages caching to keep cart data accurate while eliminating the extra calls on pages that aren’t using the cart.

This provides you with the best of both worlds—page speed AND dynamic cart functionality for a higher number of concurrent users!

Built into all WP Engine eCommerce plans, Live Cart eliminates the Cart Fragment AJAX call from occurring at unnecessary times, and improves the scalability of the cart and page speed across your entire site without losing dynamic cart functionality. 

The biggest benefit is seen when items are added to a cart during high-traffic events, like a special promotion or a sales event like Black Friday. When a customer adds an item to the cart, Live Cart loads pages 1.5 seconds faster (on average) than the default Cart Fragments script and helps keep your site from dropping connections under continuous load. 

Live Cart is not only a great way to speed up your eCommerce site, but it makes the server more stable and responsive during peak traffic.

Want to find out more? Visit WP Engine to learn about all of the powerful features included in our eCommerce hosting plans, or speak to a representative now to enable Live Cart on your eCommerce site!