Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Open New links in same tab

more options

My browser opens new links in new tabs. I want them to open new links in the same tab.

Others inquire about the same issue get a response saying:;

"Did you try it? Some sites add a target="_blank" attribute to links. Links with these attributes are supposed to open in a new window when left clicked. However, Firefox by default opens these links in a new tab in the current window. By setting browser.link.open_newwindow to 1, these links will instead open in the current tab/window."

I need step-by-step help understanding what I need to do to set the browser are suggested in the above response.

My browser opens new links in new tabs. I want them to open new links in the same tab. Others inquire about the same issue get a response saying:; "Did you try it? Some sites add a target="_blank" attribute to links. Links with these attributes are supposed to open in a new window when left clicked. However, Firefox by default opens these links in a new tab in the current window. By setting browser.link.open_newwindow to 1, these links will instead open in the current tab/window." I need step-by-step help understanding what I need to do to set the browser are suggested in the above response.

所有回覆 (1)

more options

Here is the step-by-step:

(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 browser.link.open_newwindow and pause while the list is filtered

Firefox will display several preferences with related names

(3) Double-click the browser.link.open_newwindow preference to display an editing field, and change the value to 1 then press Enter or click the blue check mark button to save the change.

What the different values do:

  • 3 = divert new window to a new tab instead (default)
  • 2 = allow link to open a new window
  • 1 = force new window into same tab replacing the current page <== select this

(4) Double-click the browser.link.open_newwindow.override.external preference to display an editing field, and change the value to 3 then press Enter or click the blue check mark button to save the change.

What the different values do:

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

More info on about:config: Configuration Editor for Firefox.