How to increase WooCommerce page speed – wc-ajax=get_refreshed_fragments

The “wc-ajax=get_refreshed_fragments” is used by WooCommerce to update the cart when users go to a cached page. Since WooCommerce is a resource intensive plugin which may use lots of server resources to load all relevant styles and scripts, it make sense to dequeue all WooCommerce related stuff on the blog posts or home page. Basically, you will allow WooCommerce scripts to run on shop relevant pages, allowing all other pages to load faster.

Solution provided  by alenabdula on gist.github.com. Add the following code to your functions.php file

Other things you can try to increase speed

Stop Heartbeat API

Add this code to functions.php file of your theme.

Note: stopping the heartbeat API will disable the auto save and revisions (you will have to manually Save Draft to save your content). Also, you will not see any real-time stats if any of your installed plugin uses the heartbeat API to update their content from the server.

Increase WP Memory

You should also increase WP memory to 256 MB. Add the following code to your wp-config.php file:

 

,

No comments yet.

Leave a Reply