Internet is full of flash ads nowadays that make page load slower, render slower and consumes more CPU, thus power. If you can browse without having any flash ads or in fact any ads loaded and without any of the tracking scripts – you can browse much faster, scroll through pages much smoother and have more hours from your battery. Nowadays, most websites use scripts from various analytics sites that track your browsing habit, use IFRAME to load tracking and social networking widgets. All of these add considerable delay to page loading and make browser consume more CPU and bandwidth. If you can turn all of them off, browsing internet feels a lot smoother, faster and you get more work hours while running on battery.
Moreover, you don’t get distracted by the flashy ads and save your children and young family members from looking at foul things.
If we could get 10% of the total internet users (2bn as of Jan 2011) to save 10% CPU, power and bandwidth while browsing everyday, we could save mega watts of power everyday throughout the world!
Using this solution, you can prevent ads and tracking scripts, prevent malicious and porn websites.
How bad is it?
Let’s take an example on a popular website. The red boxes are Flash Ads (read power suckers).
Once we disable all ads and tracking scripts, here’s how it looks:
|Total Download Size||1.2 MB||0.98 MB|
|Page load time||4.34s||3.64|
Not just during page loading, while you are on the page, doing nothing, just reading, browser continuously consumes CPU.
Before disabling the ads and tracking scripts, CPU is always around 20-25%. After disabling it is around 8-10%. The more CPU works, the more power it consumes. If you are running on battery, you can get at least 20% more time from your battery. If you have many tabs open all the time, you can save more.
Here’s how to save CPU, bandwidth and power
Go to this website and download the HOSTS file:
Follow the instruction to put the HOSTS file in your
Now go to Start Menu, type Notepad but do not hit enter. Right click on Notepad and select Run As Administrator.
Go to File menu and click Open.
Copy and paste this into the File Name and click OK.
Now go to Edit menu and select Replace. Put 127.0.0.1 in Find box and put 255.255.255.0 in Replace box. Click Replace All.
Once done, you need to type back 127.0.0.1 for the first entry localhost.
Remember, localhost cannot be 255.255.255.0.
When you have done this correctly, it will look like this.
Save the file and exit Notepad.
Then go to Start menu and type:
From the service list, double click on “DNS Client”.
First click “Stop” to stop the service.
Then from the Startup Type dropdown, select Disabled.
Close all your browsers and reopen them. I highly recommend restarting your PC.
You are ready to browse faster, smarter, cheaper!
I also highly recommend everyone to use OpenDNS. You can save yourself from getting into malicious sites and being ripped off your bank balance, property, spouse and children. Just go to www.opendns.com and follow the instruction. It is the best thing happened on the internet after Wikipedia!
How does the HOSTS file trick work?
Here’s how internet works. You type www.something.com and it goes and finds out what is the IP address for this domain. First Windows checks a file called HOSTS. If it is not defined there, it will ask the DNS Server configured for your network to give it the IP for the domain so that it can connect to the webserver. If you put fake IP in HOSTS file, Windows will hand over fake IP to the browser and browser will connect to the fake IP. Thus by putting an invalid IP, we prevent browser or any application running on your PC from reaching the ads, tracker, malicious and porn websites.
Don’t forget to share this with your friends and families!
7 thoughts on “Browse internet faster and save power using a smart HOSTS file”
Thanks for the link, you forgot to make clear why you are changing the entries from localhost to 255.255.255.0. I assume this makes things easier when doing web development on the same machine but it would be nice if you gave the details on why you made the change.
All the best,
Changing localhost to 255.255.255.0 allows the browser to determine that it should drop the request. Otherwise the request is redirected to your local HTTP server. If you don’t have one, the request will time out.
Great tip! Why was DNS client disable?
It causes high cpu when it tries to cache dns using the large hosts file.
Have you tried AdBlock Plus? addon for FireFox and Chrome.
this addon filters the URL before even before dns resolution call
Replace 127.0.0.1 to 255.255.255.0 doesn’t give benefits according to
Hitting 127.0.0.1 means if you have IIS, it is going to make a hit to IIS and cause IIS to abort the request. unnecessary cpu consumption. it does not speed up browsing noticeably, but it saves unnecessary cpu and disk usage.