How to Detect Unused CSS Selectors and Remove Them from Your Website

Improve website performance by identifying and removing unused CSS selectors. Learn effective tools and methods to clean up your stylesheets.

During the development, we forget to remove selectors, which have been changed during the different phases of the website, Which makes stylesheet file so large. Due to which, stylesheets load slower, which makes the website load slower. So, this is necessary to remove unused css rules from stylesheets to make a website load faster.

There are so many online tools, Firefox Extension as well as commercial products to do that.

Firefox Development Tool: Dust-Me Selectors

It scans your HTML pages and find the unused CSS selectors. It takes all CSS selectors from all stylesheets attached to the page you are viewing and then scan that page to find the unused selectors. It stores data separately for each website you viewed.

Disadvantage: It just gives you the unused selectors, but not providing the updated stylesheet.

Dead Weight: Ruby Gem

It is a CSS coverage tool and only works for rails website. You need to provide a set of stylesheets and URLs, from which it provides a list of selectors which can be “safely” deleted. You can manually remove them from the stylesheet using that list.

You can watch the screen-cast on Dead Weight Introduction at http://railscasts.com/episodes/180-finding-unused-css

Unused-CSS.com: Online Tool

It asks for an online URL to check. From the URL, It scans all CSS files and show the results separately for each stylesheet with graphs. Currently it scans only homepage, but if you need whole website results, you need to provide your e-mail address and it will send the results to you in email.

Helium CSS: Javascript Tool

It is a javascript-based tool and runs from the browser. It is a used for discovering unused selectors across many pages on a web site. It accepts only list of URLs, parses each URL provided and build a list of stylesheets. Using this list of stylesheets and URLs, it generates a list of unused selectors not used in any of the URL provided.

TopStyle 5: Windows Application

It is an HTML Editor, which includes a tool named Style Sweeper. Style sweeper can remove white spaces and blank lines, sort according to Class, Element, ID and also combines multiple selectors. It will also combine repeated property as well as selectors if they are same. But it’s a commercial product costs $80 (USD).

LiquidCity CSS Cleaner: PHP Script

It uses regular expressions to check any HTML page specified by you, generates the report with unused selectors for that HTML page only. From that report, you can manually remove them from the stylesheet.

There are so many other tools available. We will introduce them very soon.

Fix: Some Websites Are Not Loading Due to DNS Misconfiguration

Troubleshooting guide for DNS misconfigurations causing websites not to load. Learn common causes and step-by-step fixes for DNS issues on your system.

I have a weird problem few days back. After changing my ISP, some websites are stopped working by giving mis-configuration error in the DNS (Domain Name System) . So, I have started digging on that. I found so many users with Same problem. Some providing solution to change the MTU size of the router. I don’t even know, what is an MTU and how to change it?

After a few days, I found an answer from random forum, that change the DNS of the adaptor to Google Public DNS. So, I searched in google for it and found it.

Google Public DNS is a free, global Domain Name System (DNS) resolution service, that you can use as an alternative to your current DNS provider.  It’s speed up your browsing experience and also providing more secure data during browsing.

The Google Public DNS IPv4 addresses are as follows:

  • 8.8.8.8
  • 8.8.4.4

The Google Public DNS IPv6 addresses are as follows:

  • 2001:4860:4860::8888
  • 2001:4860:4860::8844

You can use either number as your primary or secondary DNS server. You can specify both numbers, but do not specify one number as both primary and secondary.

You can configure Google Public DNS addresses for either IPv4 or IPv6 connections, or both.

To change your DNS settings, please refer the following link, https://developers.google.com/speed/public-dns/docs/using

Note: Before start using Google Public DNS, please write down your current setting IP addresses of DNS for backup. In case you need to revert the settings.

Google Chrome Remote Desktop: Access your PC from anywhere

Learn how to securely access or allow remote access to your computer using Google Chrome Remote Desktop. Step-by-step guide for Windows, Mac, and Linux users.

Remote access tools are essential in today’s connected world — whether you’re offering tech support, working from home, or accessing files on the go. One of the most reliable and secure tools for this purpose is Chrome Remote Desktop by Google.

What is Chrome Remote Desktop?

Chrome Remote Desktop allows users to remotely access another computer through the Google Chrome browser or a Chromebook. It supports both short-term access (e.g., for remote support) and long-term remote access (for accessing files and apps on your own machine).

All connections are fully encrypted and secure.

How to Set It Up

Requirements:

  • A Google account
  • Google Chrome browser
  • Chrome Remote Desktop extension

Setup Remote Access:

  1. On your computer, open Chrome. (Login to chrome with your Gmail account)
  2. In the address bar, enter remotedesktop.google.com/access. It will open the remote desktop setup window.
  3. Under “Remote Access,” click Download Download page.
  4. Follow the onscreen directions to download and install Chrome Remote Desktop.

You may have to enter your computer password to give Chrome Remote Desktop access. You may also be prompted to change security settings in Preferences.

Share Your Computer

Now, you can provide your computer full access to others. They’ll have full access to your apps, files, emails, documents, and history.

  1. On your computer, open Chrome.
  2. In the address bar at the top, enter remotedesktop.google.com/support, and press Enter. or enter remotedesktop.google.com/access and select “Remote Support”,
  3. Under “Remote Support, “ click Download Download page.
  4. Follow the onscreen directions to download and install Chrome Remote Desktop.
  5. Under “Remote Support,” select Generate Code.
  6. Copy the code and send to the person you want to have access to your computer.
  7. When that person enters your access code on the site, you’ll see a dialog with their email address. Select Share to allow them full access to your computer.
  8. To end a sharing session, click Stop Sharing.

Tip: Once setup is complete, you don’t need to keep the Chrome browser open. Your PC just needs to be turned on and connected to the internet.

Features

  • Fully secure and encrypted connections
  • Cross-platform support: Windows, macOS, Linux
  • Access from any device with a Chrome browser
  • Completely free to use

Important Notes

  • Your computer must remain powered on and awake to accept remote connections.
  • Chrome Remote Desktop is not tied to the Chrome browser once access is configured.
  • Make sure to never share your access code with untrusted users.

Privacy & Support

FAQs

Q: Is Chrome Remote Desktop safe?
Yes, it uses secure SSL connections and requires authentication and access codes.

Q: Can I use it on my mobile device?
Yes! Install the Chrome Remote Desktop app on Android or iOS to access your computer remotely.

Q: Do both devices need to be online?
Yes, both devices must be connected to the internet.

Final Thoughts

If you’re looking for a simple, secure, and free way to access your devices or help someone with theirs, Chrome Remote Desktop is one of the best tools available today.