Your home page is your site visitors first impression of your site so you'll want it to load as fast as possible. You can reduce the load time of your WordPress home page by removing scripts that are not needed. This article shows you how to use the A2 Optimized WP plugin to remove a WooCommerce script you may not need.
WooCommerce adds a number of additional scripts to every page on your site. One of these scripts, cart-fragments.min.js, makes an AJAX call to gather information about your cart to display on the page. The AJAX call can take a substantial amount of time to complete. If your homepage does not have any elements that rely on WooCommerce, then the time spent gathering this information is wasted.
The A2 Optimized WP plugin combines custom A2 Hosting settings and functionality from third-party plugins to provide speed and security optimizations for your WordPress site. One of these optimizations uses a process called dequeuing to prevent the cart-fragments script from running on your home page. Follow these instructions to install the plugin and make the setting to optimize your home page:
The cart-fragments.min.js script is now disabled on the home page. Other pages in the site are not affected.
A2 Optimized WP includes many optimizations and security settings. You can read more about them in this article.
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.