shinsenter / defer.js

🥇 A lightweight JavaScript library that helps you lazy load (almost) anything. Defer.js is dependency-free, highly efficient, and optimized for Web Vitals.
https://shinsenter.github.io/defer.js/
MIT License
277 stars 44 forks source link

Incompatible with Woocommerce cart #75

Closed moisb closed 3 years ago

moisb commented 3 years ago

a feather. I was loving the plugin, really managed to improve the load time and the CLS on my website. But unfortunately I received complaints from users reporting that they could not: add products to the cart or clean the cart that already had products added before the plugin started to be used. is there a forecast to correct the problem?

shinsenter commented 3 years ago

Hey @moisb

Thank you for this comment.

The plugin for Wordpress is not applied to the management area so I think it might not be the problem that comes from this plugin.

You can help me confirm by adding the parameter &nodefer=1 to the bottom of the website URL to temporarily disable the plugin and debug it.

I wish you could give me more information so that I can better assist you.

moisb commented 3 years ago

add nodefer parameter has no effect. but if I disable the plugin, Woocommerce will work again. I made a video: https://www.dropbox.com/t/6o3u7DnoqtgwUTn7

shinsenter commented 3 years ago

@moisb

While leaving the plugin on, please help me debug in the following way: open the Chrome developer utility (press F12 to open), select the Console tab. Then try removing the product again, and see if any errors coming out on the Console tab.

Another way you can try is to temporarily turn off the optimization for JavaScript of the plugin. In order to effectively optimize all JavaScript on the website, more careful analysis is recommended.

Hope the above instructions help you.