Reduce unused CSS (previously remove unused CSS) is one of the most challenging suggestions triggered by Google pagespeed insights when you are auditing your website’s pagespeed performance.
What is unused CSS? And how to remove this?
Unused CSS code is any CSS style or rules that you don’t need. Removing this unused CSS rule can improve your website’s page speed performance for a better conversion rate as well as better SEO rankings.
Don’t worry! If you are not from a technical background. Here we will discuss the strategies that will help non-coders like you and thousands of other wordpress website owners to remove unused CSS.
Unused CSS refers to the stylesheets or style rules that are present in your website’s codebase but not applied to any elements on the webpage.
Unused CSS can occur due to several reasons such as design changes, code updates, or unused stylesheets from the CSS framework or library. This unused CSS makes the file larger than necessary and increases the loading time of your website.
Unused CSS generally falls into two categories. Both categories will affect your pagespeed performance in different ways.
Non-critical CSS is also known as deferred CSS. It refers to a stylesheet that is not necessary for rendering the visible area or above the fold.
Dead CSS refers to the CSS stylesheets that are no longer applied or used to elements on a website. They are basically remnants from the previous version of your website or maybe a part of testing or temporary usage.
Unused CSS stylesheets that are not needed to render a page, can be as files or as internal styles for the page contents on a web page. These unused CSS files can have several performance impacts on your website, affecting page loading time as well as user experience.
An unused CSS makes a file larger, which will increase the web page loading time for a user. This is especially critical for the user who is using a slower network connection.
Larger CSS files increase the network overhead browser needs to download more data. This can be problematic for your website to attract high traffic.
Non-critical CSS also affects the core web vitals, especially on Largest Contentful Paint (LCP), making it lengthier which drags your pagespeed score down.
LCP is a user experience (UX) metric that indicates the time length taken to load a large content such as images, text blocks, etc. To provide a better user experience it should be less than 2.5 seconds.
When a user visits any website, the browser will download, parse, and process the content of the website before displaying or rendering the webpage content. Hence, whether used or not, the browser will download each CSS file from the server.
A delayed render ,means user experience would be far from optimal.
Mobile users often have limited resources compared to desktop users. The desktop has a better internet speed than the mobile. It has a better processor and it can be connected to the Internet with the help of cables.
Whereas the mobile uses the data network and wireless connections. So, they may experience more issues when downloading and rendering large CSS files.
Check out: Core Web Vitals
Removing the unused CSS file manually is a meticulous process and a piece of coding knowledge is required for this. Here we are mentioning some strategies that you can follow.
You need to go through the whole HTML file and identify which CSS classes and IDs are not being used. It can be done by searching for a specific class or ID in your HTML code.
This process is very time-consuming. You can also use any browser developer tool such as Chrome DevTool or Firefox Developer Edition. These tools allow you to identify unused CSS rules. The CSS that is solid red indicates the code is unused.
Once you have identified the unused CSS codes, remove these codes from your style sheet. Be very careful, not to delete the CSS rule that may be used conditionally.
After removing all unused CSS rules from your stylesheets, you need to test your website once to ensure that no visual or functional issue has arisen.
There are several online tools available to remove unused CSS files to improve web performance. These tools can help you to analyze your CSS stylesheets and extract only the used CSS rules. Here is an overview of the popular tools.
PurifyCSS is a free online tool that helps to remove unused CSS from your HTML, JS file, and CSS files. But you need to manually specify which files need to be scanned one by one.
PurifyCSS provides new files with optimized CSS rather than modifying the original files. Since it doesn’t work with any live website, you need to use it in development settings.
UnusedCSS is a user-friendly online tool for removing unused CSS. you just need to plug the website’s URL into UnusedCSS. It will identify and remove unused CSS code and also tell you how much memory you have saved.
You can try this tool for free but you need to pay for a monthly membership to download the optimized files.
PurgeCSS looks very similar to PurifyCSS which helps you to analyze your webpage content and your CSS files. It removes the unused CSS selector from your CSS and provides a smaller file.
The easiest way to remove unused CSS is to use one of the WordPress optimization plugins that can help you remove unused CSS. There are many optimization plugins available that can help you. Here we are mentioning a few popular WordPress plugins.
RabbitLoader is an all-in-one performance optimization plugin that you can use to remove unused CSS features. Apart from this RabbitLoader uses various techniques like code optimization, image optimization, a premium CDN, and many more to speed up your website.
When you are using RabbitLoader no other plugin is required. The advantage of RabbitLoader over the other optimization tools is the availability of a free version.
WP Rocket is the most popular WordPress plugin that optimizes your website. It uses various optimization techniques like minification of CSS files and unused JavaScript files, caching, and others.
But when you are using WP Rocket in your WordPress site you need to install Imagify for image optimization, a premium CDN that is known as RocketCDN, and for lazy loading, you need Rocket lazy loading. It is only available in the WordPress ecosystem.
Asset cleanup is a plugin that helps you to reduce unused CSS to improve the WordPress website’s pagespeed. First, it will fetch the homepage and will show you all CSS files loaded on that page.
You need to review all loaded files. If you find any files that you don’t need then you need to unload that file.
We hope this article will help you to understand Unused CSS and guide you to remove unused CSS. If you are comfortable with coding then you can remove unused CSS manually. But if you are not a coder like me then you can install any optimization tools that can help you to reduce unused CSS.
If you are a beginner, We suggest you install the all-in-one performance optimization tool RabbitLoader which can help you to optimize your website pagespeed. It will improve the user experience as well as the conversion rate.
WP Rocket is the most popular cache plugin in the WordPress ecosystem. Since 2013, WP Rocket has been leading the optimization scene for wordpress websites. But how does it compare to RabbitLoader?
Here, we will see a detailed comparison between WP Rocket and RabbitLoader, explore the usability of both optimization plugins, and compare the pagespeed scores after installing the plugins individually on the same website.
We would test both the plugins on cellofy.shop one by one & see which plugins helps the website reach a higher pagespeed score in the pagespeed insight test.
WP Rocket is a premium cache plugin to optimize your wordpress website for better pagespeed performance. With close to 4 million websites using the plugin as claimed by WP Media, it is the leading cache plugin by some distance.
Over the years Wp cache has moved from just being a cache plugin & have introduced other optimization features too, namely minification, preloading & a few more features to make it more than just a cache plugin.
But when you are using WP Rocket, one would still need to install Imagify for image optimization. If you feel the need for a CDN service you need the premium RocketCDN. And for lazy loading, you need Rocket lazy loading.
In comparison, RabbitLoader is an all-in-one optimization plugin, you would not need any other optimization plugins to improve the performance of your wordpress or woocommerce website.
WP Rocket is a premium wordpress cache plugin. The goal of this plugin is to speed up your website, which is necessary to improve the user experience as well as SEO rankings.
Other than the cache, WP Rocket also uses various optimization techniques like caching, minification of CSS stylesheets, JavaScript files, among others. Wp Rocket being a premium plugin you would have to shell out money even if you wish to try it on your website to gauge your needs.
RabbitLoader is an all-in-one pagespeed optimization plugin that uses a premium Content Delivery Network (CDN), caching, image optimization, lazy loading, and other techniques to reduce web page loading time for your WordPress website.
When you are using our RabbitLoader, you don’t need to use different plugins for caching,Image optimization, CDN or even minification. Everything that’s needed to optimize your website is done by RabbitLoader itself without you having to toggle through 10 different settings.
Another advantage of RabbitLoader over WP Rocket is the availability of a forever free version. So if your website is not yet receiving a lot of traffic, you can just use RabbitLoader for free and spend the money to get more traffic.
Now you have a basic idea about WP Rocket and RabbitLoader. Lets see the differences between WP Rocket and RabbitLoader. Here we are mentioning some key differences between these two plugins.
WP Rocket | RabbitLoader | |
Image Optimization | To optimize images, you need to activate the Imagify & yes, you have to pay for it separately too as the free version only allows 200 MB per month. | RabbitLoaderOptimizes your images in WebP & AVIF formats using lossless technology. |
CDN | Similar to images you need another plugin, known as RocketCDN. As you guessed it, it is a premium CDN. | RabbitLoader uses integrated CDN with over 300 PoPs. |
Premium CDN Charge | An additional $7.99/ Month for using the premium CDN. | No additional charges. |
Critical CSS | WP Rocket does not generate critical CSS for your pages. | RabbitLoader Generates Critical CSS for all your pages, making them load much faster. |
Free version | WP Rocket doesn’t have any free or trail plan. | RabbitLoader has a forever free plan with 5,000 monthly page views. |
Platforms | WP Rocket is exclusive to WordPress. | RabbitLoader is available for WordPress as well as Shopify, PHP, and Laravel websites. |
Pricing | WP Rocket’s pricing starts from $59/year.Imagify is $99/year. Rocket CDN is an additional $89/Year In Total you need to pay $250/ year to optimize your website’s Performance. | Starting from $191/annual. When you are using RabbitLoader, no other plugins are required. So, there is no additional charge required to optimize your website pagespeed. |
Both optimization plugins, WP Rocket, and RabbitLoader can improve Core Web Vitals, address Google pagespeed Insights suggestions, and help you to achieve good pagespeed performance scores. Although the pagespeed score you can reach using these plugins would be different for each of them.
Caching can store static files like HTML files, CSS stylesheets, JavaScript files, media files, and images. It minimizes the work for the server, the server wouldn’t have to serve that content over and over and serve the web page for the users if you leverage browser caching.
For example, when you are visiting our website RabbitLoader.com, your browser will download the RabbitLoader logo in the cache. The next time you visit RabbitLoader.com, this logo is directly loaded from the cache. This is how you can save data per web page.
A Content Delivery Network (CDN) is a network of interconnected servers that help to speed up a website’s loading time. It reduces the physical distance between the server and the user and proves the latency.
For a better experience, WP Rocket has a custom with more PoPs. Known as RocketCDN, It offers unlimited bandwidth.
We can make all the comparisons we want but as they say the proof is in the pussing, so let’s see how WP Rocket fares against RabbitLoader, to find out we would analyze a demo woocommerce website cellofy.shop in three different cases.
Once without any optimization plugin, then after installing WP Rocket & finally we would be testing it with RabbitLoader installed.
Also, we will attach the video of the test along with the screenshots of the results.
Let’s check the pagespeed performance score of cellofy.shop without plugging any performance optimization tools.
As expected it didn’t do very well in the pageSpeed test and you managed to achieve a measly 36 for the mobile version and 50 for the desktop version.
Mobile Mode:
In mobile mode, the performance score is just 36. Which indicates this website fails the performance test for the mobile version. Which is not a good sign for any website, specially keeping the mobile first policy google in mind.
Below are the pagespeed metrics which had a heavy impact on the website’s low pagespeed scores.
Desktop mode:
While the desktop division of the The pagespeed performance score is also not very high either, it looks far better than the mobile version.
Below are the pagespeed metrics that had the biggest impact on its pagespeed score.
While installing Wp Rocket is like any other plugin in the wordpress ecosystem, you would need to “configure” it, go to each other individually & activate them.While it might give the user some satisfaction of them doing the optimization, it is nonetheless a time-consuming process.
But what’s the impact of WP Rocket on the pagespeed score?
Mobile mode:
Well as far as the mobile version goes, it’s next to no improvement, not only that we can see the Total block time is surprisingly increased after using WP Rocket plugin. Not the best way to spend you 60 odd dollars.
Desktop mode:
However, we do see the value of the WP Rocket in the desktop version of the website. The optimized version of the website managed to achieve a respectable 78 on the pagespeed score.
We can see FCP, LCP & TBT all improving from their previous states to a somewhat respectable score.
See the test video :
Finally we would install RabbitLoader after uninstalling WP Rocket of course, & check the performance of cellofy.shop, The website is checked within just 5 minutes of installing the plugin and here are the results.
Mobile mode:
Here, after installing RabbitLoader the mobile pagespeed score has improved drastically, while WP Rockets improved the score from 36 for the optimized version to just 37 RabbitLoader manages to bump up the pagespeed scores to a very respectable 82.
The score improvement is the pagespeed test is the result of improvements made in,
Desktop mode:
Finally, for the desktop version, WP Rocket achieved a respectable 78 from the original score of just 50. RabbitLoader archived a near perfect 99 out of 100. So how did RabbitLoader achieve such an unrealistic looking, near perfect score? That too for the home page?
RabbitLoader has reduced the FCP from 1.9 seconds to just 0.6 seconds.While LCP came down from 2.4 seconds to just 0.7 seconds and the TBT became just 10 ms from 650 ms on the unoptimised website.
See the test video:
Checking the website’s pagespeed score table view: without any plugin, with WP Rocket, and with RabbitLoader plugin
Without Any Plugin | With WP Rocket | With RabbitLoader | |
Mobile PageSpeed Score | 36 | 37 | 82 |
Desktop PageSpeed Score | 50 | 78 | 99 |
If you are planning to optimize your website or improve the current optimization, now you have the information on your side to make a judgment call.
If you have enough time on your hands maybe spend a day installing both WP Rocket & RabbitLoader on your website & see the differences in score yourself.
Maybe you are using WP Rocket for a long time, maybe it’s time you try RabbitLoader which can give you a bit more performance, that little bit of an edge that might become a deciding factor for the search engine to rank you higher or lower than your competition.