I found a way to collect all unused JavaScript and CSS files (in .json file) that are affecting mobile page speed. How can I locate and delete these? When I click on them, I see additional code.
One more thing, I am using Tag Manager for Finsweet JavaScript, but this is showing up here as well. The same goes for Google Analytics, which is also showing as Tag Manager.
The scripts you’ve marked are GTM and various Finsweet attribute libs. You can remove them if you’re not using them.
You seem to be saying that you’ve setup FS libs to be installed through GTM- which would inject them into your page and you’d see them loaded as you do here. I’m not sure what your question is there, but at the least, if you do not want those scripts, you can remove them from GTM to remove them from your site.
i SAID…i am using these G analytics and Finsweet scripts via tag manager, MEANS, these are not available on webflow directly, and i set tag manager to fire these all after 3 seconds of website load…
then why here i see these as unused CSS/Java script? you see red lines, this mean these are unused…
i checked, i do not have any of these on my website on webflow, may be i am wrong, now i want to locate these and delete , if any of these are on my webflow.
First, if you want help from the community, watch your tone. No one here has any reason to help you.
Incorrect. GTM injects the scripts into your page. Your browser loads them, therefore you still see them in sources. The only difference is how they got there.
You’re looking at the code coverage graph. Red indicates bytes of code in that JS/CSS source that are unused. It has nothing to do whether you need that library or not, and everything to do with how fully that library is being used on this page render.
What you CAN see graph is that your largest script is Webflow.js at 1/2 MB, and that you may want to ensure you’ve minified it. Your CSS is also large, and could benefit from minification and a class purge.
If you do not want those FS libraries, you need to remove them everywhere, and that includes your GTM injected scripts.
YEs, website loads these after 3 seconds of page load, as this is the time i set in GTM… but why these are intrupting mobile page speed test, showing ‘remove unused css and java’??
i am using Finsweet scripts, i need these.
hmm…thanks…i am not dev., so i followed what google said on how to detect unused css and java…and find these.
i am using webflow’s features to miify java and css during publication. is there anyother way i can further minify these?
That recommendation is general guidance. It’s telling you to make sure you’re not using unneeded libraries. For devs, it’s an indication their libraries could possibly be more efficient.
Sure, that’s a good practice, except you’ve indicated that you’re using them, so they cannot be removed.
Your webflow.js is quite large, I’m not sure what modules you have running on your site- ecom, user accounts, etc. Unfortunately you cannot easily switch those off, even if you are not using them. But reducing the Webflow modules you are using is how you’d reduce that further.
Dig through the forum, there are 10 years of posts here on optimization techniques that work. If you need to hire an expert, you could start a conversation with @webdev