How to Remove Unused Css

Lightweight themes like Astra, GeneratePress, and Genesis load very less CSS and scripting on the site. This helps remove unused CSS and JavaScript errors in the Google PageSpeed ​​Insights tool and skyrocket the speed score. However, 99% of commercial WordPress themes China Business Fax List combine multiple features and load heavy scripts and CSS. Whether you use a light or heavy theme, you still need plenty of functionality through the plugin. By combining theme and plugins, the overall speed score will impact every source file on the site. In this article, we will explain how to remove unused CSS and JavaScript in WordPress to improve Google PageSpeed ​​Insights score. Related: Read over 400 free WordPress tutorials. What is Unused CSS and JavaScript? Let’s explain this with a simple example.

Why Is This a Problem?

Unfortunately, almost all plugins will load resources on all pages of your site. This will greatly impact page load speed and reduce speed score in tools like Google PageSpeed ​​Insights. You will see errors like below as opportunities, when testing the page URL in PageSpeed ​​Insights. PageSpeed ​​error for unused CSS and JS PageSpeed ​​error for unused CSS and JS Although the tool indicates that this will not directly affect the performance score, it has a huge impact on the loading time. At this point, a score of 30% is blocking time and having unused CSS/JS and render blocking resources will drag the score down. Also, some hosting companies will charge based on bandwidth usage.

Unused Css

China Business Fax List
China Business Fax List

Loading unnecessary CSS/script files on your site will increase bandwidth usage by several times. Therefore, it is necessary to identify unused CSS and JavaScript and remove them from loading on all pages. How to identify unused CSS and JavaScript? You need to understand what causes unused resources to load on your pages. As explained above, you don’t need to load contact form, online store or review plugins on all pages. However, the whole task is more complicated than you think.First, purge caching and disable the caching plugin on your site. Now go to Google PageSpeed ​​Insights tool and check the speed score.

Leave a comment

Your email address will not be published.