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 do I stop Firefox from opening links in a new window?

  • 7 replies
  • 1 has this problem
  • 33 views
  • Last reply by jscher2000

more options

Currently, I'm using Firefox 82.0.2 on Fedora 31. Recently, it's started opening most, but not all links in a new window instead of the current one. Not on all sites, but most. As a pair of examples, it opens links to articles on gasbuddy.com in a new window but not on Slashdot, and until a few months ago, it only opened a new window if I right-clicked and selected New Window from the context menu. I'd like to get the old behavior back, as this is quite inconvenient.

Chosen solution

sideburns said

I have not knowingly changed any of those settings, but browser.link.open_newwindow is 2 and browser.link.open_newwindow.override.external is 0.

Well, there's yer trouble:

browser.link.open_newwindow =

2 => allow links targeted to new windows open new windows (current) 3 => divert links targeted to new windows to a new tab instead (default) 1 => force links targeted to new windows to stay in the same tab (what you may prefer)

You can double-click to edit the preference value, click the blue checkmark button (or press Enter/Return) save it, and test sites you care about in another tab right away (no restart needed).

Read this answer in context 👍 1

All Replies (7)

more options

I assume (?!) that the links are targeted to open in a new window using either the target="_blank" attribute in the link or a script command. Normally, Firefox would divert those to a new tab in the current window. Is that what you prefer to get back to?

There is an option for that on the Preferences page. To zoom in on it, try this:

You can check that here:

  • Linux: "3-bar" menu button (or Edit menu) > Preferences
  • Mac: "3-bar" menu button (or Firefox menu) > Preferences
  • Windows: "3-bar" menu button (or Tools menu) > Options
  • Any system: type or paste about:preferences into the address bar and press Enter/Return to load it

In the search box at the top of the page, type tabs and Firefox should filter the page. Make sure the box is checked for

"Open links in tabs instead of new windows"

or uncheck and re-check it.

Any difference?

Helpful?

more options

You assume wrong. Until recently, those links opened in the same window and the same tab. Now they don't. If you're going to make a suggestion, please make it relevant to the question AS ASKED, rather than making a wild guess as to what the person asking the question meant. As is, your reply was a complete waste of both of our times.

Helpful?

more options

Well then.

So the problem isn't that Firefox opens links in a new window instead of a new tab, the problem is that it opens in a new window or new tab instead of the same tab. But only on some sites. Normal links still work correctly on other sites. Puzzling.

What are your current new window settings

Just in case this is related to links coded to open in a new window, where are your settings different from the defaults:

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

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

  • browser.link.open_newwindow => default is 3 (new tab instead of new window)
    Were you previously setting this to 1 to override targeting and force the link to stay in the same tab?
  • browser.link.open_newwindow.restriction => default is 2 (allow popups for feature-limited windows)

Otherwise, what have you tried so far?

If it's a site-specific problem, these are standard suggestions to try when sites stop working normally:

Cache and Cookies: When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.

(1) Clear Firefox's Cache

See: How to clear the Firefox cache

If you have a large hard drive, this might take a few minutes.

(2) Remove the site's cookies (save any pending work first). While viewing a page on the site, click the lock icon at the left end of the address bar. After a moment, a "Clear Cookies and Site Data" button should appear at the bottom. Go ahead and click that.

In the dialog that opens, you will see one or more matches to the current address so you can remove the site's cookies individually without affecting other sites.

Then try reloading the page. Does that help?

Testing in Firefox's Safe Mode: In its Safe Mode, Firefox temporarily deactivates extensions, hardware acceleration, and some other advanced features to help you assess whether these are causing the problem.

You can restart Firefox in Safe Mode using either:

  • "3-bar" menu button > "?" Help > Restart with Add-ons Disabled
  • (menu bar) Help menu > Restart with Add-ons Disabled

and OK the restart. A small dialog should appear. Click "Start in Safe Mode" (not Refresh).

Any improvement?

Helpful?

more options

I have not knowingly changed any of those settings, but browser.link.open_newwindow is 2 and browser.link.open_newwindow.override.external is 0. I have not tried anything else, because I don't know enough about the settings to avoid messing things up. As far as cache and cookies go, I'd rather not mess with them until we've tried less drastic methods, especially as this isn't affecting everything.

One question, though, should I try setting those two config keys back to the default, and if so do I have to restart Firefox to get them working? I'm no newcomer to Firefox, and I'm familiar with editing the keys, but again, I don't want to be frobbing at random.

Helpful?

more options

Chosen Solution

sideburns said

I have not knowingly changed any of those settings, but browser.link.open_newwindow is 2 and browser.link.open_newwindow.override.external is 0.

Well, there's yer trouble:

browser.link.open_newwindow =

2 => allow links targeted to new windows open new windows (current) 3 => divert links targeted to new windows to a new tab instead (default) 1 => force links targeted to new windows to stay in the same tab (what you may prefer)

You can double-click to edit the preference value, click the blue checkmark button (or press Enter/Return) save it, and test sites you care about in another tab right away (no restart needed).

Helpful?

more options

Weird! That link you posted to a question I asked about a year ago shows that I did make those changes, but they never caused this problem until recently. However, I've got things back where I want them, so I'm not complaining!

Helpful?

more options

I have a guess about what might have happened. The Preferences page can only set that value to 3 or 2. If you were changing a setting in the Tabs section and accidentally checked the box (setting it to 3), when you unchecked that box, you would get the value 2 in about:config. The only way to set the value to 1 is by hand.

Probably a good idea to bookmark this thread.

Helpful?

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.