PDA

View Full Version : Block annoying advertisements using your hosts file


vonedaddy
16th January 2012, 04:33 AM
I found this extremely useful, my web surfing is so much more enjoyable now!

http://www.putorius.net/2012/01/block-unwanted-advertisements-on.html

cclukins
16th January 2012, 05:19 AM
Nice, thanks for sharing that!

marko
16th January 2012, 05:25 AM

adblock plus, ghostery, and noscript plugins work even better at the cost of some annoyance of having to manually allow some javascript that noscript blocks.

vonedaddy
16th January 2012, 05:46 AM
adblock plus, ghostery, and noscript plugins work even better at the cost of some annoyance of having to manually allow some javascript that noscript blocks.

I agree this is not for everybody, but it does not need to be installed and doesnt take any resources. It does exactly what I need it to do.

leigh123linux
16th January 2012, 05:58 AM
I found this extremely useful, my web surfing is so much more enjoyable now!

http://www.putorius.net/2012/01/block-unwanted-advertisements-on.html

Post the content of the blog in post #1 otherwise I will move thread to general support as it only has linked content.

leigh123linux
16th January 2012, 09:22 AM
Moved to Links (http://forums.fedoraforum.org/forumdisplay.php?f=24)

finite9
7th March 2012, 02:10 PM
Can someone help me understand how this works? Let me clarify:

I update my hosts file with the mvps hosts file. I then run traceroute to verify that some bad domains really do go to 127.0.0.1.

But then, when I load Firefox and go to a website that I know links to some of these blocked domains, I can still see in Firefoxes stats bar that it tries to load the domain. Now, I do understand that it is probably just loading from 127.0.0.1, but it's quite slow... a lot slower than I expected.

I compare this to using NoScript: I re-instate a blank hosts file, install Noscript in firefox, and try to load a page, such as phoronix for example. Now the page loads lightning fast, and I don't even see that Firefox tries to load those blocked domains whatsoever: they never appear in Firefoxes status bar.

Am I observing two different things here or is using the hosts file just slower than using NoScript?

I thought that maybe NoScript was blocking Javascript and was therefore faster, but I have allowed the Phoronix domain, so it should be loading all javascript for that site.

benbadge72
12th March 2012, 11:41 PM
Can someone help me understand how this works? Let me clarify:

I update my hosts file with the mvps hosts file. I then run traceroute to verify that some bad domains really do go to 127.0.0.1

Am I observing two different things here or is using the hosts file just slower than using NoScript?

I thought that maybe NoScript was blocking Javascript and was therefore faster, but I have allowed the Phoronix domain, so it should be loading all javascript for that site.

From my understanding, a host file is quicker. You have it all in one easily adaptable place without reliance on external sources. Check back in on some of the sites providing hosts files once in a while, update accordingly.

May even be a possible cron job to run a script to download and update periodically. Although I would suggest using caution in doing that.

Carried this over from Ubuntu / Debian without any hitches. Was kind of chuckle to find in Fedora forums, as well. Was not really a surprise or news.

finite9
13th March 2012, 09:30 AM
I didn't mention that this was on Windows 7 at work.

I got home, did the same thing on F16 (added hosts file) and it works just as fast as using noscript). The 'advantage' of using noscript is that when you use the Collusion plugin in Firefox, you don't see any links to ad domains. When you use a hosts file, you see the links to ad domains, but they're all going to localhost, which Collusion doesn't tell you.

As an aside, Windows 7 completely failed to work with the msvp hosts file at 7.5MB. I rebooted and Windows failed to even start. As soon as I removed the hosts file it worked fine.

I realised (again) after comparing Win7 to F16 that Linux is beautifully fast. Windows loads so much cruft it really does slow down the browsing experience.