Clean unused css and save the cleaned file – css usage or dust me selector

Clean unused css and save the cleaned file – css usage or dust me selector

I came across this firefox addon which did a good job for me. You just have to run the addon, and save the file where no unused css is present.

1) Download the addon at this page: https://addons.mozilla.org/en-us/firefox/addon/css-usage/

2) Run the scan and save your css file like shown in this printscreen:

3) Be aware the addon scans the CURRENT page, you might have some “unused css” on this page but it’s needed on other pages.
For a wordpress site for example, you might not use some css on the index.php page but you can use it on the single.php page.

4) in your saved file, you will see the UNUSED text before an unused css code, you may want to remove that code in order to clean up your css.

Update: a solution for the multiple page problem is using the dust me selector add-on and check your site with the sitemap spider !

Hope this helps :)

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
About Benwake

I'm Ben, working as a System Engineer for a big company. Webdesign is one of my biggest passions, along with a lot of other hobby's. I love to share my interests and I hope you'll enjoy this website. More Posts

6 Comments to “Clean unused css and save the cleaned file – css usage or dust me selector”

  1. now if only a had a mac application, unix shell script, or applescript to remove the csv file code from the ***.css file. Any hints or tips?

  2. Hey, not really, but the application in this article is an online app, so don’t worry about mac :)
    Let me know if you’ve found a solution.

  3. okay mooie beknopte handleiding over het opkuisen van ongebruikte CSS code.
    Ik mis echter het vervolg, alles wat je hiet uitlegd is me duidelijk en heb nogal wat unused selectors: 534 in totaal hoe kom ik hier nu echt vanaf.
    alvast bedankt voor je reply.

  4. It’s very interesting tools, i will download it now , and try it,

    thank you

Leave a comment

Your email address will not be published.

*