搜尋 Mozilla 技術支援網站

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

Learn More

How to open local HTML files in a new tab instead of a new window?

more options

Firefox version: 95.0.2 (64-bit) OS: macOS 10.15.7

Any way to force all HTML files to open in a new tab rather than a new window? This really could be annoying when you are working on several local HTML files at once :(

Firefox version: 95.0.2 (64-bit) OS: macOS 10.15.7 Any way to force all HTML files to open in a new tab rather than a new window? This really could be annoying when you are working on several local HTML files at once :(

被選擇的解決方法

You can override how external links are opened via the browser.link.open_newwindow.override.external pref. If this pref has the default value -1 then browser.link.open_newwindow is used. The meaning of the value of browser.link.open_newwindow.override.external is the same as of browser.link.open_newwindow

  • 1:current tab; 2:new window; 3:new tab;

So new Tab should be: about:config => browser.link.open_newwindow.override.external = 3

You can open the about:config page via the location/address bar. You can click the button to "Accept the Risk and Continue".

DISCLAIMER: modifying prefs directly via the about:config page is not officially supported and there is no guarantee that this will keep working in future releases or otherwise "breaks" Firefox.

從原來的回覆中察看解決方案 👍 1

所有回覆 (3)

more options

One thing to look at is in Tools -> Settings -> General Tab and check the box next to Open links in tabs instead of new windows in the Tabs section.

To force other things into new tabs, go to about:config and change the following to true:

  • browser.search.openintab
  • browser.tabs.loadBookmarksInTabs
  • browser.urlbar.openintab

WARNING: Changing preferences through this interface not officially supported Hidden settings edited using the about:config tool are explicitly not supported, which means that Mozilla makes no guarantees they will be supported in the future, or that Mozilla will fix them if they break. Mozilla does not test these preferences, and will not in the future. That includes security and performance testing which these preferences may affect.

[Warning added by moderator]


Hopefully that helps, Mark H.

由 Chris Ilias 於 修改

more options

選擇的解決方法

You can override how external links are opened via the browser.link.open_newwindow.override.external pref. If this pref has the default value -1 then browser.link.open_newwindow is used. The meaning of the value of browser.link.open_newwindow.override.external is the same as of browser.link.open_newwindow

  • 1:current tab; 2:new window; 3:new tab;

So new Tab should be: about:config => browser.link.open_newwindow.override.external = 3

You can open the about:config page via the location/address bar. You can click the button to "Accept the Risk and Continue".

DISCLAIMER: modifying prefs directly via the about:config page is not officially supported and there is no guarantee that this will keep working in future releases or otherwise "breaks" Firefox.

more options

Solved. Thank you guys!