In my woocommerce website when item is added to cart (in home page, shop page, product details page or from anywhere) it takes a very long time for that to be added to the cart. The ajax request takes more than 4 seconds to get the response.
Website is using cloudflare pro and cloudflare APO. I’m also using W3 total cache plugin for caching.
And as I noticed all Ajax requests are very slow in the website.
Is there any code customization we can do? or anything?
I tried uninstalling all other plugins it also did not fix the problem.
Installing w3 total cache and cloudlare made the web page loading fast. But all ajax requests are slow
2
Answers
I think the woocommerce ajax is slow due to your Server..so please contact with your server support guy for this
don’t worry we can improve add to cart speed please follow some ideas
Database Optimization:
Use a plugin like "WP-Optimize" or "WP-Sweep" to clean up your database and remove unnecessary data.
Optimize your database tables to reduce query execution times.
Minimize HTTP Requests:
Reduce the number of HTTP requests made by your website. This includes scripts, stylesheets, and external resources.
Reduce External Requests:
Minimize the number of external requests made by your site to third-party services. Test your site request in gtmetrix.
WooCommerce Settings:
Adjust the settings in WooCommerce > Settings to reduce the number of products displayed per page, set catalog image sizes, and control other product-related settings.
Thanks