• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Blocking facebook adverts using HOSTS

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Anjow

Member
Joined
Jan 12, 2005
Location
UKbiquitous
Before anyone jumps down my throat for blocking their stream of revenue - I am wanting to block the 'zwinky' adverts since they are both annoying (animated) and immoral (the product is crammed with adware/spyware).

So I'm trying to block them using HOSTS because I view facebook in IE so it isn't affected by my normal ad blocker, which sometimes has false positives.

Here's some of the source, the bit which I think shows the advert:

Code:
<div class="sponsors" style="width: 760px; text-align: center; clear: both; margin: 10px auto 15px auto;"><iframe src='http://ads.ak.facebook.com/ads/creative/Accelerator/728x90.html' frameborder="0" height="90px" width="728px" scrolling="no" marginheight="0" marginwidth="0"></iframe></div>

I've tried adding this to HOSTS:

Code:
127.0.0.1   ads.ak.facebook.com
127.0.0.1   http://ads.ak.facebook.com

But it doesn't seem to block them. Can anyone think why this is? I'm not too good with HTML/CSS.

...Or is it that I do have them blocked but I'm not seeing the effects yet for some reason?
 
I hadn't restarted my browser. It seems to work now.

I have that hosts file too, but I have added a few of my own to it.
 
Anjow said:
Before anyone jumps down my throat for blocking their stream of revenue - I am wanting to block the 'zwinky' adverts since they are both annoying (animated) and immoral (the product is crammed with adware/spyware).

I block as many ads as I can find on my system if they put adware/spyware on their site I couldent care less if I cost them money, in fact I think they should pay me to deal with it.
 
Xenocide said:
or use the adblock plus extension for firefox, blocks all ads :)

Anjow said:
because I view facebook in IE so it isn't affected by my normal ad blocker, which sometimes has false positives.

I do, normally. But like I said, I view this site in IE for a reason.
 
But it doesn't seem to block them. Can anyone think why this is? I'm not too good with HTML/CSS.
Using HOSTS to block website is a easy way but after you add website to your host, you should clear your history files in IE temp directory, or the browser will get the website content from there. Using Httpwatch , you can find that the IE browser load the ads.ak.facebook.com with 302 mode.

For IE user, Adblock Pro can block facebook adverts by default with nothing error. See http://forum.adblockpro.com/viewtopic.php?id=14 . There is also many choice and rule for block ads well in case of advertisement change their sub domains.

Difference between ad blocker and hosts is that hosts will visit 127.0.0.1 until a timeout happened, with more CPU usage and you should not install IIS which will host a localwebsite at http://127.0.0.1

For Firefox user, Adblock Pro user can user Adblock Plus. Maxthon and other browser also have ad blocker that can remove facebook ads, but you need to add rules by yourself , and I heard that sometimes error will happen, but don't know why.
 
What about blocking Ads in a SmartPhone (Android) ?
I use Adaway, but it doesnt block some Facebook ads in the Facebook App.

Like "Pages you might like"
or pages that your friends like
or other sponsored links
 
Last edited:
Back