Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How to block unwanted tabs opening in the back?

more options

I noticed this very intrusive trend recently: First, I have one tab open, and on certain sites when I click on a link (or anywhere on the page, ie. input fields or just the middle of nowhere) it opens the link (or the same page) in new tab, and the previous tab where I was originally loads some ads or other unwanted stuff. (I never checked it thoroughly) Sometimes this goes on 2 or 3 times in a row before I get to my intended destination, leaving me with 2-3 tabs on the left, that do who knows what in the background. Is there any way to get rid of this problem? Thanks in advance for any solutions!

I noticed this very intrusive trend recently: First, I have one tab open, and on certain sites when I click on a link (or anywhere on the page, ie. input fields or just the middle of nowhere) it opens the link (or the same page) in new tab, and the previous tab where I was originally loads some ads or other unwanted stuff. (I never checked it thoroughly) Sometimes this goes on 2 or 3 times in a row before I get to my intended destination, leaving me with 2-3 tabs on the left, that do who knows what in the background. Is there any way to get rid of this problem? Thanks in advance for any solutions!

Asịsa ahọpụtara

It's a deliberately deceptive tactic and made to be purposely hidden behind your main active window. Can't imagine these methods are actually helping sales but whatever, FF still has tools to fight this kind of shit.

Set these entries to "true":

  • dom.disable_window_open_feature.location
  • dom.disable_window_move_resize

DOM is what's responsible for websites getting in there and messing with your expectations of what's standard in the browser interface like hiding your mouse cursor, not letting you close a window, hiding pop-ups behind other elements, etc. You can set all of the "dom.disable_window_open_feature.xxx" options to true if you want. It will help to keep websites from doing stupid, irritating things.

Next, check these:

  • browser.link.open_newwindow
  • browser.link.open_newwindow.override.external
  • browser.link.open_newwindow.restriction

These dictate where any new windows will open. Most people like new windows to open as new tabs and always having new windows open as new tabs also removes the possibility of any pop-up hiding behind your main browser window.

My personal settings for these are listed below. They ensure if any pop-ups manage to get through they are forced to open in a new tab and not in an new window.

  • browser.link.open_newwindow = 3
  • browser.link.open_newwindow.override.external = -1
  • browser.link.open_newwindow.restriction = 0
Gụọ azịza a na nghọta 👍 1

All Replies (7)

more options

Some sites are annoying -- we shouldn't overlook the possibility that this is their way of monetizing you. If there are particular sites that cause this problem that you want to post the addresses of, a volunteer could take a look.

But another possible culprit would be an extension. You can view, disable, and often remove unwanted or unknown extensions on the Add-ons page. Either:

  • Ctrl+Shift+a (Mac: Command+Shift+a)
  • "3-bar" menu button (or Tools menu) > Add-ons

In the left column, click Extensions. Then cast a critical eye over the list on the right side. All extensions are optional. If in doubt, disable.

Often a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.

Any improvement?

more options

Dear jscher2000, thanks for the quick response, unfortunatelly this doesn't seems to be the "problem" since every extension I have is there on purpose and so far didn't caused any trouble. I also suspect this is a move from the website's side, I just don't know where to turn for help blocking those few lines of code on my side...

more options

Can you provide links to pages on the problem sites where you experience this problem?

You also could experiment with different popup and script blockers, although I have no idea whether those would help.

more options

The only concrete example I can recall at the moment is Pirate Bay, but it happened on various blogs and online magazines too. I will get back with links if I run into them again, until then, thanks for the suggestions!

more options

Asịsa Ahọpụtara

It's a deliberately deceptive tactic and made to be purposely hidden behind your main active window. Can't imagine these methods are actually helping sales but whatever, FF still has tools to fight this kind of shit.

Set these entries to "true":

  • dom.disable_window_open_feature.location
  • dom.disable_window_move_resize

DOM is what's responsible for websites getting in there and messing with your expectations of what's standard in the browser interface like hiding your mouse cursor, not letting you close a window, hiding pop-ups behind other elements, etc. You can set all of the "dom.disable_window_open_feature.xxx" options to true if you want. It will help to keep websites from doing stupid, irritating things.

Next, check these:

  • browser.link.open_newwindow
  • browser.link.open_newwindow.override.external
  • browser.link.open_newwindow.restriction

These dictate where any new windows will open. Most people like new windows to open as new tabs and always having new windows open as new tabs also removes the possibility of any pop-up hiding behind your main browser window.

My personal settings for these are listed below. They ensure if any pop-ups manage to get through they are forced to open in a new tab and not in an new window.

  • browser.link.open_newwindow = 3
  • browser.link.open_newwindow.override.external = -1
  • browser.link.open_newwindow.restriction = 0
more options

Thank you proxy.socks, I set up the recommended values and so far they are working (not that I had too much time since then to roam around the interwebz, but hey, it's a start...) I appreciate your help!

more options

I have been using this code in a user.js file for over 10 years now, to stop websites from messing with the various " window_open " features in Firefox.

// advanced JavaScript Options: user_pref("dom.disable_window_move_resize", true); user_pref("dom.disable_window_open_feature.directories", true); user_pref("dom.disable_window_open_feature.menubar", true); user_pref("dom.disable_window_open_feature.personalbar", true); user_pref("dom.disable_window_open_feature.scrollbars", true); user_pref("dom.disable_window_open_feature.toolbar", true);

By using the user.js file I don't have to remember to set these prefs every time I create a new Profile; just place a copy of that file in a new Profile and I'm "good to go". Plus I have a couple of dozen other preferences in user.js, too. Anything in about:config can be added to user.js, including prefs for your most used extensions. http://kb.mozillazine.org/User.js_file