All my images are now fully optimized, but I still found a way to increase my page load speed, and this makes quite a large difference.
Disable Cart Fragmentation on Front Page (Best to disable on the front page only, as you will want to load this as fast as possible. In some cases Cart Fragmentation can add up to 10 seconds! ) I am down to 1.6s fully loaded with 400 products, Elementor Pro, Astra Pro, 18 plugins.
In WordPress admin panel, navigate to “Appearance > Editor” and locate the functions.php file. (Or edit the file in cPanel File Manager). Add the following code at the end of the file. (I use a child theme)
/** Disable Ajax Call from WooCommerce */
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11);
function dequeue_woocommerce_cart_fragments() { if (is_front_page()) wp_dequeue_script('wc-cart-fragments'); }
If you test your site with GTMetrix and look at the Waterfall, you can see if you need it or not. (I saved 1.2s)
(wc-ajax=get_refreshed_fragments)
Disable Cart Fragmentation on Front Page (Best to disable on the front page only, as you will want to load this as fast as possible. In some cases Cart Fragmentation can add up to 10 seconds! ) I am down to 1.6s fully loaded with 400 products, Elementor Pro, Astra Pro, 18 plugins.
In WordPress admin panel, navigate to “Appearance > Editor” and locate the functions.php file. (Or edit the file in cPanel File Manager). Add the following code at the end of the file. (I use a child theme)
/** Disable Ajax Call from WooCommerce */
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11);
function dequeue_woocommerce_cart_fragments() { if (is_front_page()) wp_dequeue_script('wc-cart-fragments'); }
If you test your site with GTMetrix and look at the Waterfall, you can see if you need it or not. (I saved 1.2s)
(wc-ajax=get_refreshed_fragments)
Attachments
Last edited: