Getting rid of popup windows for good
gijskruitbosch at gmail.com
Tue Aug 26 07:44:32 UTC 2014
On 26/08/2014 00:48, Shane Caraveo wrote:
> On 2014-08-25 3:48 PM, Gavin Sharp wrote:
>> How do most "pop-behinds" work? I've certainly seen those, and I have
>> a hard time thinking of valid use cases for that behavior (they have
>> been 100% annoyance in my experience).
>> Someone figuring out how to block those would be great - probably
>> relatively tricky.
> Never looked into it, apparently the correct term is popunder. A
> quick look at popunder scripts, seems they do this within a click event:
> w = window.open()
> I wonder why "open new windows in a tab instead" pref doesn't work on
> this...hmm, that is only link targets, not window.open.
I think if you use a non-"_blank" target, we don't stick it in a tab.
But sticking it in a tab here would probably not make the user any
Perhaps we could just make window.blur() trigger window.close() if the
user has never interacted with the window?
The only vaguely legit example I can think of are "Tell us what you
think about our website" surveys that then re-focus() when you close the
website, but I think those usually don't do the hiding themselves but
just tell the user "continue with your original window as normal" in the
page loaded in the popup. Even if they did, I think they're probably
outnumbered by the "bad" sites? Hard to be sure without data, but I
would suspect so.
The other thing that came up was window/document/body-wide click
handlers. We could probably do something against those as well if
they're very widespread, but it wouldn't fix the example Shane gave, of
using the click on the "default" button on the page (and there are
vaguely legit uses for that example, too, e.g. some travel search sites
offer you to open their competitors in a new window when searching for
something ("Compare against...") - you can manipulate checkboxes on the
page to avoid that happening if you're not interested)
More information about the firefox-dev