«•»


Adblock Solution for Safari 4 (Windows and Mac)

Date February 25, 2009 : Permalink :

Safari Adblock

Update: Works in Safari 5 as well.

While there isn’t a native Ad Blocker in Safari 4, I was able to clean up most websites by using Fanboy’s Element Hider stylesheet1 to collapse the advertisement elements.

Here are the steps to setting up the Advertisement Hider in Safari 4:

Step 1: Download Fanboy’s Element Hider CSS file and save it to the Safari profile (or any folder of your choosing).

Step 2: Launch Safari4, go to Preferences -> Advanced -> Style Sheet -> Other… and select the fanboy-adblocklist-elements.css file you just saved.

Note: I am aware of 3rd party tools like Proximity to block ads but I prefer using a browser-specific solution. If you have a better way of handling ads in Safari, please share your ideas in the comments.

  1. The Element Hider is part of an excellent, lightweight Adblock List maintained by Fanboy and available for Opera (my primary browser).  It is made up of two parts: (1) a urlfilter.ini replacement file that catches the ads before they are loaded and (2) an element hider .css file that colapses the ad space so that the webpage looks cleaner. []
  • http://intensedebate.com/people/Yinchie Yinchie

    Great tip, not hiding everything but it is a start :)

  • http://intensedebate.com/people/Yinchie Yinchie

    Great tip, not hiding everything but it is a start :)

  • tom

    thanks! greetings from germany

  • tom

    thanks! greetings from germany

  • http://www.fanboy.co.nz/adblock Fanboy

    Yinchie, Probably never hide everything, you can only do so much with css. However if Safari had an proper url blocker extension (supporting both Windows/OSX), then I'd openly support it.

  • http://www.fanboy.co.nz/adblock Fanboy

    Yinchie, Probably never hide everything, you can only do so much with css. However if Safari had an proper url blocker extension (supporting both Windows/OSX), then I'd openly support it.

  • Cameron

    SafariBlock is working great for me in Safari 4 beta. It adds a panel to your Safari preferences, supporting block lists as well as manually adding entries (either by right-clicking on an image or by typing it in).
    http://code.google.com/p/safariblock/

  • Cameron

    SafariBlock is working great for me in Safari 4 beta. It adds a panel to your Safari preferences, supporting block lists as well as manually adding entries (either by right-clicking on an image or by typing it in).
    http://code.google.com/p/safariblock/

  • Cameron

    Oh, forgot to say though that it's Mac-only :-(

  • Cameron

    Oh, forgot to say though that it's Mac-only :-(

  • http://www.fanboy.co.nz/adblock Fanboy

    Whats the adblock format used in SafariBlock? does it support whitelists?

  • http://www.fanboy.co.nz/adblock Fanboy

    Whats the adblock format used in SafariBlock? does it support whitelists?

  • Kevin

    http://code.google.com/p/safariblock/

    SafariBlock is the best I've ever used.

  • Kevin

    http://code.google.com/p/safariblock/

    SafariBlock is the best I've ever used.

  • Singh

    It's not as effective as adblock in firefox, but still it works for most of the blocking!! Thanx

  • Singh

    It's not as effective as adblock in firefox, but still it works for most of the blocking!! Thanx

  • http://blog.joeldev.com Joel

    http://glimmerblocker.org/ <— better than safariadblock. doesn't require any sort of inputmanager or simbl hacks, and is totally independent from browser version (ie, wont break when you upgrade safari).

  • http://blog.joeldev.com Joel

    http://glimmerblocker.org/ <— better than safariadblock. doesn't require any sort of inputmanager or simbl hacks, and is totally independent from browser version (ie, wont break when you upgrade safari).

  • http://intensedebate.com/people/klagreca Kristopher LaGreca

    am I correct in guessing that scripts like this "hide" elements, but don't stop them from executing? So, Flash elements, for example, will still be taking up memory and CPU cycles, even if they don't display?

  • http://intensedebate.com/people/klagreca Kristopher LaGreca

    am I correct in guessing that scripts like this "hide" elements, but don't stop them from executing? So, Flash elements, for example, will still be taking up memory and CPU cycles, even if they don't display?

  • http://opindian.com/blog/ ahpatel

    Correct. It is collapsing the advertising elements but not preventing them from being downloaded.

    On a Windows system, you would have to use a proxy solution or a modified hosts file to prevents ads from ever being downloaded. If you go the HOSTS route, I suggest http://someonewhocares.org/hosts/hosts

    The combination of the modified hosts file AND Fanboy's collapsed element hider is what makes the ads go away and keeps the websites looking well formatted.

  • http://intensedebate.com/people/ahpatel ahpatel

    Correct. It is collapsing the advertising elements but not preventing them from being downloaded.

    On a Windows system, you would have to use a proxy solution or a modified hosts file to prevents ads from ever being downloaded. If you go the HOSTS route, I suggest http://someonewhocares.org/hosts/hosts

    The combination of the modified hosts file AND Fanboy's collapsed element hider is what makes the ads go away and keeps the websites looking well formatted.

  • http://intensedebate.com/people/klagreca Kristopher LaGreca

    Thanks for the tip! Since I'm on a mac, I decided to use OpenDNS and add the most popular ad domains to my list. Let's see how that works.

  • http://intensedebate.com/people/klagreca Kristopher LaGreca

    Thanks for the tip! Since I'm on a mac, I decided to use OpenDNS and add the most popular ad domains to my list. Let's see how that works.

  • Jake Snyder

    @Fanboy

    This is amazing. I'm recommending it to all of my friends. Keep up the good work.

  • Jake Snyder

    @Fanboy

    This is amazing. I'm recommending it to all of my friends. Keep up the good work.

  • http://www.facebook.com/people/Anish-Patel/11827028 Anish Patel

    test

  • http://www.mcdarby.com Erik McDarby

    What we need is a SafariAdBlock for Safari on Windows 2000/ME/2003/XP/Vista/.etc

  • soeschelz

    sorry,

    but all the posts about other adblockers are for the mac version.

    is there any other blocker for the windows version of safari 4.0?

    Thanks from Germany

  • soeschelz

    sorry,

    but all the posts about other adblockers are for the mac version.

    is there any other blocker for the windows version of safari 4.0?

    Thanks from Germany

  • http://photomod.wordpress.com/ Yalin

    Fanboy’s element hider trick works, thank you for the tip

  • http://photomod.wordpress.com/ Yalin

    Fanboy's element hider trick works, thank you for the tip

  • dafa

    It can not work out!!!

    • rafael

      It sure does !

  • Ray

    Good css style sheet (fanboy). Does a better job of collapsing than I’ve seen so far.

  • http://heypursegirl.com/ kathy

    Works perfectly, especially in Facebook. Thanks!

  • Dave

    It worked. Simple and clean!

  • Pingback: Safari 4: Is It Time To Switch From Firefox? | DodaPedia

  • siva

    this is absolutely great
    thanks to my fellow indian who did this

  • CSM

    This is great!! Thanks

  • Private Sale

    Thanks to the Indian, i can surf the web almost free of any stupid advertisement. It absolutely works with the new Safari 4.0.2 and it’s easy to use. No need to install lots of programs and filters that only exhaust memory. I tested different CSS-files and the recommended one from above works best. Greetings from Austria.

    Test your Ad-Blocker on: http://pseudo-flaw.net/content/adblock/

  • techgeekz

    Thanks a lot… for me it worked like a charm:)

    I was a little skeptical at first but gave it a go and to my surprise some of the regular websites that I visit daily did show up ' clean ' to my relief..

    I am using Safari 4.0.2 on Win Vista

    Now if only there was one for Google Chrome..the only reason I am sticking to FireFox ( and now Safari after this tune-up ) is that Chrome does not have a supported Adblock Plus kind of a Program, there's one AdMuncher available but its paid and expensive for adblocking programme :(

  • http://twitter.com/inket inket

    Thanks a lot !

  • mw1862

    Works great for Yahoo Fantasy Sports. I hate ads while trying to manage team rosters. Thanks.

  • mw1862

    Regarding Google Chrome and Iron browsers, follow this link to a great adblocker that WORKS.

    http://www.adsweep.org/

  • Pingback: i cannot stay on my email page for long as www.mcashcard.org/eif/urchin.html pops up and blocks me,what to do? | Popup Blog

  • Carlos

    It work very fine with “Anuncios Google”. Mi Safari is free of Google Adds

  • Pingback: PlaceMyProduct Blog

  • Silizium

    How can I add sites manualy to the css sheet?

  • http://www.opindian.com ahpatel

    You can manually add sites to the urlfilter.ini file, under the [exclude] section.

    Additionally, you can inform Fanboy of the missing sites on his forum

  • Grateful Living

    Thank You!!!