How to find and remove unused js and CSS that are common across multiple HTML pages?
Last Updated : 18 Apr, 2025 - Asked By Ashok
Here are my Problems in my website:
- Manually checking the CSS and JS is not scalable
- Large CSS and JS files slowing down the initial page load
- There are many HTML pages in my website. I suspect some of them are not using.
I have tried the following solutions to solve my issue. Some of them are,
- I tried to split CSS and JS files. But I cant tell what is safe and Will it affect other pages
- Google Chrome DevTools "Coverage" tab shows only one page at a time.
- Iam not sure, Is it possible to configure for multiple HTML files in tools.
- I couldnt find tools, scripts or techniques that can remove shared unused styles and scripts across multiple HTML Pages.
Any tools, scripts, or techniques that can help remove shared unused styles and scripts across the entire site.
Iam looking a way to automatically scan multiple pages to identify unused CSS and JS. But I could'nt find a proper solution.
Can someone please recommend a solution to find my problem solution?
css
unused js
unused css