Adblock Plus and (a little) more

On the pop-up blocker in Adblock Plus · 2012-02-15 18:33 by Wladimir Palant

There is a semi-hidden new feature in Adblock Plus 2.0: a pop-up blocker. I wanted to explain what this feature is about and why there are no big announcements about it.

The built-in pop-up blocker

Firefox already has a pretty good pop-up blocker of its own. In fact, this pop-up blocker did a terrific job to eliminate pop-ups on the web. Advertising via pop-up (or pop-under) windows is now a rare exception even though it used to be very common.

The main issue of this pop-up blocker however is that it tries to recognize user’s intention. If it thinks that the user meant to trigger an action it will let the pop-up appear. Some websites are abusing this possibility by opening pop-up windows in addition to performing the requested action.

Our pop-up blocker

This is where Adblock Plus comes in. A large percentage of issue reports that we received was about pop-up windows opened by a bunch of misbehaving websites. In the end I realized that implementing an additional pop-up blocker in Adblock Plus was unavoidable. It isn’t meant to replace the built-in pop-up blocker however, merely to complement it in the few cases where it fails. It’s a very dumb mechanism — it doesn’t try to do anything fancy, it simply closes pop-up windows that match the rules.

The downsides

There are issues with this approach of course. First of all, you understood correctly: Adblock Plus is closing pop-ups after they were opened. As far as I know, that’s the best a Firefox extension can do. And then of course, not every new window opened is something that the user doesn’t want — when adding a pop-up blocking rule one needs to be very certain that it will match unwanted pop-ups and nothing else. As I said, the mechanism in Adblock Plus is a very dumb one and won’t do anything to prevent false positives.

This is why using the pop-up blocker isn’t recommended for Adblock Plus users. This is mainly a feature for filter list authors and the recommendation for them is to add clear cases only, not something that the user might ever open intentionally. And they have to explicitly specify the $popup option on a filter, filter rules will not apply to pop-ups by default.


Comment [4]

  1. k2jp · 2012-02-15 22:03 · #

    Thanks for your reply.
    I’ll use $popup only if needed.

  2. zee · 2012-02-21 17:40 · #

    Is there any documentation on the popup blocking functionality , I see nothing in “Writing Adblock Plus filters”.

    I am curious if its possible to 1. Stop from opening up any popups.
    2. Stop* popups being from any site

  3. Ares2 · 2012-02-21 17:46 · #


    @1. (Careful, will also block target=_blank links etc., only useful for very specific use cases and if you know what you are doing)




    BTW: Better use the forums for questions like this.

  4. Peter · 2012-03-09 16:45 · #

    Will this feature be added to the chrome version of adblock?

    Reply from Wladimir Palant:

    I’m not yet certain that it is doable but I would like to add it there as well.

Commenting is closed for this article.