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

搜尋 Mozilla 技術支援網站

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

了解更多

Last closed tab reopens at start

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

more options

Hi community, when i have only one tab opened in Firefox i can click on the "close tab"-X or Ctrl+W. This action will close Firefox, but it won't close the tab. So when i start Firefox this last opened tab, which usually would be closed after clicking on the X, will open at start again.

This behavior drives me crazy. If i want to close Firefox with the only tab opened remaining until restart, i usually would click the red X of the Windows forms control elements.

Is there any option in "about:config" which really can close the last remaining tab, while also closing Firefox?

Thank you

Hi community, when i have only one tab opened in Firefox i can click on the "close tab"-X or Ctrl+W. This action will close Firefox, but it won't close the tab. So when i start Firefox this last opened tab, which usually would be closed after clicking on the X, will open at start again. This behavior drives me crazy. If i want to close Firefox with the only tab opened remaining until restart, i usually would click the red X of the Windows forms control elements. Is there any option in "about:config" which really can close the last remaining tab, while also closing Firefox? Thank you

由 ffproblems 於 修改

被選擇的解決方法

As far as Firefox is concerned, if you set Firefox to restore your previous session automatically (first checkbox on the option page), it doesn't matter whether that is one tab or hundreds. There isn't a way to skip the restore in the "only one tab " scenario.

There is an option to prevent windows from closing when you close the last tab. Instead, when you close the last tab, Firefox will display either your home page or a new tab page. If you then close the window and it's the last window, that is what will get restored. Worth a try? Here's how:

(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 LASTTAB and pause while the list is filtered

(3) Double-click the browser.tabs.closeWindowWithLastTab preference to switch the value from true to false

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

所有回覆 (5)

more options

選擇的解決方法

As far as Firefox is concerned, if you set Firefox to restore your previous session automatically (first checkbox on the option page), it doesn't matter whether that is one tab or hundreds. There isn't a way to skip the restore in the "only one tab " scenario.

There is an option to prevent windows from closing when you close the last tab. Instead, when you close the last tab, Firefox will display either your home page or a new tab page. If you then close the window and it's the last window, that is what will get restored. Worth a try? Here's how:

(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 LASTTAB and pause while the list is filtered

(3) Double-click the browser.tabs.closeWindowWithLastTab preference to switch the value from true to false

more options

Hi jscher, thanks for the fast tip. I will use your suggested setting in 'false' mode.

But i have to make clear, that it could be easier. The logic behind my suggestion goes like:

If you chose to restore tabs, than they obviously will be restored at the next start. But if you close the last tab, then this action would save one click or an Alt+F4, because with one action you tell the browser that 1. you want to close the last tab and 2. at the same time you want to close the whole browser(/window). So it knows that you intentionally wanted to not restore the session in this case, because you already closed the last tab. This is the logic behind clicking on the X of a tab. It should be closed instead of restored

more options

Note that it is always better/safer to close Firefox via Quit/Exit in the menu instead of closing tabs or by using the close X if you want to restore tabs with the next start. What happens if you close the last tab is controlled by the above mentioned browser.tabs.closeWindowWithLastTab pref.

more options

cor-el said

Note that it is always better/safer to close Firefox via Quit/Exit in the menu instead of closing tabs or by using the close X if you want to restore tabs with the next start. What happens if you close the last tab is controlled by the above mentioned browser.tabs.closeWindowWithLastTab pref.

Can you explain, why it is safer to close the Browser with "Menu > Quit"? I mean, this action should be identical to the OS's window close element. Otherwise the program would be lousy programmed.

Also I think we are speaking about different things. The rembering just works fine. My only complain is the behavior of the browser rembering a tab i already closed. The fact that it is the last tab, shouldn't be an exception. Chrome does it. Opera does it. Edge does it too. I can not imagine a reason why the Firefox browser has another behavior, which btw is inconsistent. If you know the reason I would be thankful to hear it.

more options

Using the close X in a window means that Firefox will first close this window and when it notices that this was the last window then closing Firefox will be initiated that includes saving data kept in memory like session data (sessionstore.jsonlz4) to the profile folder. This already causes problem if there is an hidden or forgotten pop-up window open and that is a good reason to get used to it closing Firefox this way.