Scripts to exclude from async/defer?
-
I am using cloudflare’s Rocket Loader to speed up my site. This speeds up websites with a lot of javascript by asynchronously loading the scripts.
However, when I do so, I get a flash of the sidebar and cookie notice before the javascript is loaded and they get hidden.
Cloudflare has an option to disable this feature for certain scripts… you just have to add data-cfasync=”false” to the scripts.
My question is: which script controls the mobile sidebar and the cookie notice? I’m guessing it’s just woodmart/js/functions.min.js but I’d like to be sure.
Thanks!
Hi,
It usually happens when you move CSS files to the footer. You need to keep all CSS files in the head.
Regards
This is specifically in regards to JavaScript only.
I’ll start with the theme functions js file and see if that works.
Our theme scripts already in the footer so defer option does nothing with our theme scripts.