X
Tap here to go to the mobile version of the site.

Support Forum

How to prevent firefox from opening new window/tab

Posted

How do I stop Firefox from opening a new window or tab? For example, if I click on a link a new window or tab opens. I would like Firefox simply go to the linked site. This would allow me to use the forward or back arrow to navigate.

How do I stop Firefox from opening a new window or tab? For example, if I click on a link a new window or tab opens. I would like Firefox simply go to the linked site. This would allow me to use the forward or back arrow to navigate.

Chosen solution

Firefox takes its cue from how the site has coded its links. Usually they stay in the same tab, but they will open in a new window or tab if:

  • the site specifies a "target" in the link
  • the site attaches a script to the link that opens a new window

There is a group of setting that should force Firefox to ignore these aspects of the link, but I never tried it myself. If you want to experiment:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.

(2) In the search box above the list, type or paste neww and pause while the list is filtered

(3) Adjust the preferences as follows:

(A) browser.link.open_newwindow - for links in Firefox tabs

  • 3 = divert new window to a new tab (default)
  • 2 = allow link to open a new window
  • 1 = force new window into same tab <= Try this one

(B) browser.link.open_newwindow.restriction - for links in Firefox tabs

  • 0 = apply the setting under (A) to ALL new windows (even script windows) <= Try this one
  • 2 = apply the setting under (A) to normal windows, but NOT to script windows with features (default)
  • 1 = override the setting under (A) and always use new windows

(C) browser.link.open_newwindow.override.external - for links in other programs

  • -1 = apply the setting under (A) to external links (default)
  • 3 = open external links in a new tab in the last active window <= Try this one
  • 2 = open external links in a new window
  • 1 = open external links in the last active tab replacing the current page

To return to normal if things go haywire, right-click each "modified" preference and choose Reset.

If you need a test page: https://jeffersonscher.com/res/popit.html

Read this answer in context 1

Additional System Details

Installed Plug-ins

  • Shockwave Flash 27.0 r0

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0

More Information

Zombieslayer57 0 solutions 34 answers

try opening settings and deselect in the tabs section in general the "When you open a link in a tab switch to it immediately." Hope this helps! :) -Zombieslayer57

try opening settings and deselect in the tabs section in general the "When you open a link in a tab switch to it immediately." Hope this helps! :) -Zombieslayer57
jscher2000
  • Top 10 Contributor
8783 solutions 71835 answers

Chosen Solution

Firefox takes its cue from how the site has coded its links. Usually they stay in the same tab, but they will open in a new window or tab if:

  • the site specifies a "target" in the link
  • the site attaches a script to the link that opens a new window

There is a group of setting that should force Firefox to ignore these aspects of the link, but I never tried it myself. If you want to experiment:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.

(2) In the search box above the list, type or paste neww and pause while the list is filtered

(3) Adjust the preferences as follows:

(A) browser.link.open_newwindow - for links in Firefox tabs

  • 3 = divert new window to a new tab (default)
  • 2 = allow link to open a new window
  • 1 = force new window into same tab <= Try this one

(B) browser.link.open_newwindow.restriction - for links in Firefox tabs

  • 0 = apply the setting under (A) to ALL new windows (even script windows) <= Try this one
  • 2 = apply the setting under (A) to normal windows, but NOT to script windows with features (default)
  • 1 = override the setting under (A) and always use new windows

(C) browser.link.open_newwindow.override.external - for links in other programs

  • -1 = apply the setting under (A) to external links (default)
  • 3 = open external links in a new tab in the last active window <= Try this one
  • 2 = open external links in a new window
  • 1 = open external links in the last active tab replacing the current page

To return to normal if things go haywire, right-click each "modified" preference and choose Reset.

If you need a test page: https://jeffersonscher.com/res/popit.html

Firefox takes its cue from how the site has coded its links. Usually they stay in the same tab, but they will open in a new window or tab if: * the site specifies a "target" in the link * the site attaches a script to the link that opens a new window There is a group of setting that should force Firefox to ignore these aspects of the link, but I never tried it myself. If you want to experiment: (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk. (2) In the search box above the list, type or paste '''neww''' and pause while the list is filtered (3) Adjust the preferences as follows: (A) '''browser.link.open_newwindow''' - ''for links in Firefox tabs'' * 3 = divert new window to a new tab (default) * 2 = allow link to open a new window * '''1 = force new window into same tab''' <= Try this one (B) '''browser.link.open_newwindow.restriction''' - for links in Firefox tabs * '''0 = apply the setting under (A) to ALL new windows''' (even script windows) <= Try this one * 2 = apply the setting under (A) to normal windows, but NOT to script windows with features (default) * 1 = override the setting under (A) and always use new windows (C) '''browser.link.open_newwindow.override.external''' - for links in other programs * -1 = apply the setting under (A) to external links (default) * '''3 = open external links in a new tab in the last active window''' <= Try this one * 2 = open external links in a new window * 1 = open external links in the last active tab replacing the current page To return to normal if things go haywire, right-click each "modified" preference and choose Reset. If you need a test page: https://jeffersonscher.com/res/popit.html

Question owner

jscher2000,

OMG it worked! I no longer have a screen full of unwanted tabs and windows.

THANK YOU.

jscher2000, OMG it worked! I no longer have a screen full of unwanted tabs and windows. THANK YOU.
Fire Marshal Bil 1 solutions 25 answers

It does not work. The strange thing is that it opens in new tabs ONLY in Google results, but if I go to other sites, they open in the same tab, which is what I want.

What am I missing? Using 59.0.2 on Windows 7.

It does not work. The strange thing is that it opens in new tabs ONLY in Google results, but if I go to other sites, they open in the same tab, which is what I want. What am I missing? Using 59.0.2 on Windows 7.
jscher2000
  • Top 10 Contributor
8783 solutions 71835 answers

Helpful Reply

musicollector said

It does not work. The strange thing is that it opens in new tabs ONLY in Google results, but if I go to other sites, they open in the same tab, which is what I want. What am I missing? Using 59.0.2 on Windows 7.

Hmm, that setting should override new windows/tabs on all sites.

Could you check this setting:

https://www.google.com/preferences

Scroll down to "Where results open" and make sure that box is not checked

''musicollector [[#answer-1093384|said]]'' <blockquote> It does not work. The strange thing is that it opens in new tabs ONLY in Google results, but if I go to other sites, they open in the same tab, which is what I want. What am I missing? Using 59.0.2 on Windows 7. </blockquote> Hmm, that setting should override new windows/tabs on all sites. Could you check this setting: https://www.google.com/preferences Scroll down to "'''Where results open'''" and make sure that box is not checked
Fire Marshal Bil 1 solutions 25 answers

Thank you, thank you, THANK YOU! You have restored my sanity!!! You rock!

Thank you, thank you, THANK YOU! You have restored my sanity!!! You rock!