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

搜尋 Mozilla 技術支援網站

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

了解更多

Under "New Windows and Tabs", you can set your Homepage. How can I get New Tabs to use the Homepage I have selected?

  • 3 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 cor-el

more options

Go to "about:preferences". Select "Home". Under "New Windows and Tabs", see options "Homepage and new windows". Choose "Custom URLs...". Enter a local HTML file in the address box.

Now, when you open a new Firefox window, the local HTML file will open as your homepage. This is good.

However, if you open a new tab, your selected homepage will NOT load. Go back to the "New Windows and Tabs" preferences section. Under "New Windows and Tabs", see options "New tabs". The only options here are "Firefox Home" and "Blank Page". I expect to see either the same options as for my homepage above, or an option to use the chosen homepage from above.

I have been using the extension "New Tab Override", but this is an insufficient solution because it cannot support local files in a usual way (due to limitations in the Firefox API). It has a workaround which allows it to load up and store a local file for its use, but this is insufficient because the file is copied and stored by the extension - changes to the file are not reflected until you go into the extension settings and purge and reload it.

Go to "about:preferences". Select "Home". Under "New Windows and Tabs", see options "Homepage and new windows". Choose "Custom URLs...". Enter a local HTML file in the address box. Now, when you open a new Firefox window, the local HTML file will open as your homepage. This is good. However, if you open a new tab, your selected homepage will NOT load. Go back to the "New Windows and Tabs" preferences section. Under "New Windows and Tabs", see options "New tabs". The only options here are "Firefox Home" and "Blank Page". I expect to see either the same options as for my homepage above, or an option to use the chosen homepage from above. I have been using the extension "New Tab Override", but this is an insufficient solution because it cannot support local files in a usual way (due to limitations in the Firefox API). It has a workaround which allows it to load up and store a local file for its use, but this is insufficient because the file is copied and stored by the extension - changes to the file are not reflected until you go into the extension settings and purge and reload it.

所有回覆 (3)

more options

Hi worlebird, there's no convenient way to use a file:// URL for your new tab page, as you've discovered.

As noted in the other thread where you posted, here in support we work with the Firefox we have today and can suggest relevant features, available settings changes, and workarounds such as add-ons. If those do not suit your needs, you can submit comments and suggestions through one or more of the following links:


In Firefox 58 and earlier, there was a method to use a configuration file to modify the new tab page at startup. However, that was supposed to stop working in Firefox 59, so the method in this thread may be obsolete: I want to open new tabs in a local page.

If you wanted to run the script by hand in the Browser Console:

(1) One-time setup

(A) 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.

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

(C) Double-click the devtools.chrome.enabled preference to switch the value from false to true

Be cautious about the scripts you run!

(2) Script to override the new tab page for the current session

You can open the separate Browser Console window using either:

  • "3-bar" menu button > Web Developer > Browser Console
  • (menu bar) Tools > Web Developer > Browser Console
  • (Windows) Ctrl+Shift+j

Paste the following script after the caret (»), edit about:newtab to the desired URL, and press Enter to execute it:

var {classes:Cc,interfaces:Ci,utils:Cu} = Components;
try {
  aboutNewTabService = Cc["@mozilla.org/browser/aboutnewtab-service;1"].getService(Ci.nsIAboutNewTabService);
  aboutNewTabService.newTabURL = 'about:newtab';
} catch(err){
  Cu.reportError(err);
}

More info on the Browser Console: https://developer.mozilla.org/docs/Tools/Browser_Console

more options

worlebird said

  • Go to "about:preferences".
  • Select "Home".
  • Under "New Windows and Tabs", see options "Homepage and new windows".
  • Choose "Custom URLs...".
  • Enter a local HTML file in the address box.


Now, when you open a new Firefox window, the local HTML file will open as your homepage. This is good.

However, if you open a new tab, your selected homepage will NOT load...


See This Post.


~Pj

more options

Note that probably using only this line will work in the Browser Console:

  • aboutNewTabService.newTabURL = "about:newtab";
  • "3-bar" menu button or Tools -> Web Developer

This is a getter/setter, so you can check the curren newTabURL setting via:

  • aboutNewTabService.newTabURL;