display | more...

Adblock is one of the most popular extensions for Mozilla's Firefox browser. In a nutshell, it blocks the display of banner ads by letting you define filters to run content through before displaying it.

Along with a certain mouse gestures extension, Adblock is one of the reasons I cling rabidly to my sweet sweet Firefox. After using it since it was first released to the public, I've become so accustomed to browsing without ever seeing banner ads and distracting Flash animations that I can't understand how others can deal with annoying web advertising any more.

Adblock is quite powerful. By default, its filter mechanism just searches for a string in any non-text objects it comes across (which means it can block banner ads, Flash ads, <iframe>s, and more), but it also has support for full Perl-like regular expressions (only filter entries delimited by slashes are interpreted as regular expressions). This means that with only a few clever (though arcane) entries in your filter list, you can hide nearly all banner ads you'd ever come across.

Here are a few filter entries to get you started:

  • doubleclick blocks content from Doubleclick
  • ads.osdn.com*ad_id blocks any image that has "ads.osdn.com", followed by anything, followed by "ad_id" in the URL
  • /ad(s|\d)?(\.[\w\d]*){2}/ blocks images coming from a domain like "ads.here.com" or "ad4.there.org"
  • /(emoticon|smil(ey|ies)).*\.(gif|jpg|png)/ blocks any horrible smiley image with "emoticon" or "smiley" or "smilies" in the URL

(I'm pretty pleased with my filter list, which lives at http://maltp.com/files/adblock.txt. Download it and import it with Adblock's "Import filters..." option if you want to try it out, though it's usually better to build a list yourself so it suits your browsing patterns.)

You can also change the way it hides objects. If you feel bad about denying your favorite sites of revenue from displaying banner ads, you can set it to download but not display the things it blocks (tick off "Hide ads" instead of "Remove ads" at the bottom of the Adblock Preferences dialog). The "Collapse Blocked Elements" option (in the "Adblock Options" menu of the Adblock Preferences dialog) removes the spaces that are left by a hidden object, so it looks like it was never even there (the "Remove ads" option does this automatically).

A couple other features worth noting:

  • [Ctrl][Shift][F] covers up Flash objects on the page you're currently viewing with a <div>.
  • [Ctrl][Shift][A] (or clicking on the "Adblock" panel in the status bar) displays a dialog box with all blockable elements on the page, shows you which objects are already blocked (and by which filter), and lets you define a new filter.
  • [Ctrl][Shift][B] toggles Adblock on and off.
  • The "Import filters" and "Export filters" entries in the Adblock Options menu let you save your current filter list, and try other lists on for size.
  • The "Check Parent Links" option looks at the links that images point to, blocking the image if a filter matches the link. (Love this option!)
  • The more entries in your filter list, the longer it takes to filter through them. Keep your list as short as possible (that's why we've got regexps!), and put the most-commonly-used filters towards the top of the list for better performance.

Visit http://addons.mozilla.org to get the latest release and free yourself from online advertising!

Adblock is maintained by "the Adblock Crew" — Henrik Aasted, Wladimir Palant and rue. I include them in my nightly prayers.

Log in or register to write something here or to contact authors.