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 stop firefox from forcing a new tab for "new" web pages?

  • 2 பதிலளிப்புகள்
  • 1 இந்த பிரச்சனை உள்ளது
  • 2345 views
  • Last reply by 7

Apologies if this is a bit limited, during typing it I ran into the issue I'm about to describe which navigated me away from this page and lost all the progress of my post as I was wrapping up :')

The issue I'm having right now is Firefox forcibly opening pages it thinks are a new site in new tabs, despite the site itself not requesting new tabs or windows. Specifically this is happening with sites between different "iterations" of itself while still being the same and having fully integrated layouts and UI.

For example: Most pages on the site have an update "https://www1" prefix, but some pages have the old "https://" only. Firefox keeps opening new tabs when navigating between these different pages despite them being the same website. I know the pages themselves are not sending new tab requests because this doesn't happen in Chrome.

So far, my "solution" has been to go through about:config to adjust the browser.link.open_newwindow value to 1 instead of 3, which forces all links to stay within the same window. This unfortunately causes a whole host of other issues though.

Because its an override, it also means any links opened from an external program (like discord) forcibly open in the last active tab, navigating away from the page. This is obnoxious and annoying in and of itself because it means to save the tabs I already have open I need to manually open a new tab in FF before clicking any link, which I never remember to do. (Goodbye post progress (': )

If that weren't bad enough, when trying to hit the back button to get to the previous page FF ends up in some sort of weird redirection loop "between" pages, where the last page will disappear but FF won't navigate to the link it was trying to open either, so its just a blank infinitely loading page with the URL of the link that was opened. The only way to stop this from happening is to navigate back 2 pages, losing the current page, before it starts the redirect loop. If the loop starts before this happens, the tab locks up and needs to be hard-refreshed with f5 or completely closed due to the weird lag it causes.

Literally all I want Firefox to do here is not assume a new tab needs to be opened just because the URL "seems" different to it. Is there ANY way to get this behavior?

Apologies if this is a bit limited, during typing it I ran into the issue I'm about to describe which navigated me away from this page and lost all the progress of my post as I was wrapping up :') The issue I'm having right now is Firefox forcibly opening pages it thinks are a new site in new tabs, despite the site itself not requesting new tabs or windows. Specifically this is happening with sites between different "iterations" of itself while still being the same and having fully integrated layouts and UI. For example: Most pages on the site have an update "'''https://www1'''" prefix, but some pages have the old "'''https://'''" only. Firefox keeps opening new tabs when navigating between these different pages despite them being the same website. I know the pages themselves are not sending new tab requests because this doesn't happen in Chrome. So far, my "solution" has been to go through '''about:config''' to adjust the '''browser.link.open_newwindow''' value to '''1''' instead of '''3''', which forces all links to stay within the same window. This unfortunately causes a whole host of other issues though. Because its an override, it also means any links opened from an external program (like discord) forcibly open in the last active tab, navigating away from the page. This is obnoxious and annoying in and of itself because it means to save the tabs I already have open I need to manually open a new tab in FF before clicking any link, which I never remember to do. (Goodbye post progress (': ) If that weren't bad enough, when trying to hit the back button to get to the previous page FF ends up in some sort of weird redirection loop "between" pages, where the last page will disappear but FF won't navigate to the link it was trying to open either, so its just a blank infinitely loading page with the URL of the link that was opened. The only way to stop this from happening is to navigate back 2 pages, losing the current page, before it starts the redirect loop. If the loop starts before this happens, the tab locks up and needs to be hard-refreshed with f5 or completely closed due to the weird lag it causes. Literally all I want Firefox to do here is not assume a new tab needs to be opened just because the URL "seems" different to it. Is there ANY way to get this behavior?

தீர்வு தேர்ந்தெடுக்கப்பட்டது

Normally, Firefox doesn't open a new tab for cross-site navigation unless there is a target attribute instructing it to do so. But there is an exception: if you are browsing in a pinned tab. The idea behind a pinned tab -- originally called an Application Tab -- is to be dedicated to a specific site. Therefore, links with a different host name will launch into a new tab. I don't know whether there is any way to fine-tune the host name detection to work with this particular web app.

More info on pinned tabs: Pinned Tabs - keep favorite websites open and just a click away.

If this is not caused by using a pinned tab, hmm, are you using any Container-related add-ons?

For a workaround to the external link problem, check out the following (long) discussion of the related settings:

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

More info on about:config: Configuration Editor for Firefox. The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future. Since we have had this setting for a long time, I feel comfortable mentioning it.

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

(3) Review/Edit the preference values as follows (double-click the current value to open an editing field, and then when you're done, press Enter or click the blue checkmark to save the change):

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

This is the one that has a checkbox on the Preferences page and determines whether targeted links are allowed to open in a new window or are diverted to a new tab instead; there's no effect on untargeted links:

  • 3 = divert new window to a new tab (default)
  • 2 = allow link to open a new window
  • 1 = force new window into same tab <= You are using this as a workaround

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

This preference governs external links that open in Firefox:

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

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

By default, if a page sets width, height, or toolbars for a popup, Firefox will open it in a "dialog-style" window. To force those into a tab as well, you can change this preference to 0. However, I don't think this affects your question.

  • 0 = apply the setting under (A) to ALL new windows (even script windows with limited features)
  • 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

To return to normal if things go haywire, there's an arrow-like reset button at the right end of each of those rows if it has a non-default value.

Read this answer in context 👍 2

All Replies (2)

தீர்வு தேர்ந்தெடுக்கப்பட்டது

Normally, Firefox doesn't open a new tab for cross-site navigation unless there is a target attribute instructing it to do so. But there is an exception: if you are browsing in a pinned tab. The idea behind a pinned tab -- originally called an Application Tab -- is to be dedicated to a specific site. Therefore, links with a different host name will launch into a new tab. I don't know whether there is any way to fine-tune the host name detection to work with this particular web app.

More info on pinned tabs: Pinned Tabs - keep favorite websites open and just a click away.

If this is not caused by using a pinned tab, hmm, are you using any Container-related add-ons?

For a workaround to the external link problem, check out the following (long) discussion of the related settings:

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

More info on about:config: Configuration Editor for Firefox. The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future. Since we have had this setting for a long time, I feel comfortable mentioning it.

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

(3) Review/Edit the preference values as follows (double-click the current value to open an editing field, and then when you're done, press Enter or click the blue checkmark to save the change):

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

This is the one that has a checkbox on the Preferences page and determines whether targeted links are allowed to open in a new window or are diverted to a new tab instead; there's no effect on untargeted links:

  • 3 = divert new window to a new tab (default)
  • 2 = allow link to open a new window
  • 1 = force new window into same tab <= You are using this as a workaround

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

This preference governs external links that open in Firefox:

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

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

By default, if a page sets width, height, or toolbars for a popup, Firefox will open it in a "dialog-style" window. To force those into a tab as well, you can change this preference to 0. However, I don't think this affects your question.

  • 0 = apply the setting under (A) to ALL new windows (even script windows with limited features)
  • 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

To return to normal if things go haywire, there's an arrow-like reset button at the right end of each of those rows if it has a non-default value.

jscher2000 - Support Volunteer மூலமாக திருத்தப்பட்டது

jscher2000 said

Normally, Firefox doesn't open a new tab for cross-site navigation unless there is a target attribute instructing it to do so. But there is an exception: if you are browsing in a pinned tab. The idea behind a pinned tab -- originally called an Application Tab -- is to be dedicated to a specific site. Therefore, links with a different host name will launch into a new tab. I don't know whether there is any way to fine-tune the host name detection to work with this particular web app.

This ended up being the problem. Ironically, both sites I keep pinned happen to have this url altering across site pages, and are obviously the sites I use most so it was very annoying and inconvenient. Setting the external link value to 3 solved the problem with my work around, so I'll continue using it for now, but may look around pinned tab config to see if it can be disabled more simply.

Thank you =]