Suppress New Windows

You can suppress new windows generated by target="new" (or in the case of Zeldman, target="eljefe") by using about:config or adding user_pref("browser.block.target_new_window", true); in user.js.

To do this in with about:config, type about:config in the address box; right click anywhere in the browser; select New > String; paste in browser.block.target_new_window for the preference name, and then true for the string value.)

The upside of this is that it gives you, the user, control over what goes in a new window, tab, or not. The downside is that it requires modifying your behaviour in certain contexts, eg. having to right-click for a new window after the Rebuild popup in Movable Type (unless you like viewing your site in a tiny window). Windows generated by clicking a Javascript link, commonly used for weblog comments forms, will still pop-up as new windows with this pref set. [via comment at diveintomark]

» posted by richard on April 30, 2003 at 11:27 AM



Thank you, thank you, thank you, thank you, thank you.


# posted by Ken Walker

This tip has been on Mozilla Firebird Help since the beginning of time...

# posted by David Tenser

Good for you David, that was helpful :{

# posted by Jed

Could have tried these out. Seems to do the same thing but with more options.

# posted by Brandon

Could have used these, too. More options available.

# posted by Brandon

awesome! thanks. just tried this in camino on OS X and it works in that as well.

you have to add it manually to your user.js though. about:config doesn't seem to work correctly in it yet.

its something has caused me annoyance often. me happy!

# posted by atariboy

Mozilla should include a "manager" under the Tools menu so that you can control how links open.

# posted by Poochkiss

Quite wonderful. I never use more than one window anyway, and always open new links in a new tab with the middle mouse button.

# posted by Johan Svensson

Wouldn't that be a new boolean, not a new string?

Of course, the string "true" will evaluate to true, but so will the string "false".

# posted by douglas bagnall

You're right. I poked around in a nightly build of Mozilla (20030401) without any about:config settings changed or added, and it appears that browser.block.target_new_window is initially set, but set to false. So in newer releases, it's a matter of changing the setting in about:config rather than creating a new one.

# posted by Richard

I just like to say thank you again. We can now regain control over our browsing. All hail Mozilla!

# posted by Lonnie

firebird has the option of blocking popups

# posted by macewan

Great comments guys. Peter FDA

# posted by Peter

Whatever you do, be sure you back-up your files first in case something goes horribly wrong. That's a good tip even if you decide not to implement any anti-spam tools.

# posted by Credit Factor

Post a Comment

This discussion has been closed.