Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Restore Last Session - But not if I close last tab

  • 5 个回答
  • 2 人有此问题
  • 1 次查看
  • 最后回复者为 cor-el

more options

I searched this forum but couldn't find an answer. I have "restore last session" turned on, but I'd like Firefox wouldn't reopen my last visited site after I close the browser by closing the last tab. In other words: if I close the browser by a regular means (by clicking the rightmost upper X, or by right-clicking the taskbar and choosing close window) it goes to the last viewed site when I reopen the browser – and that's ok – but when I close the last tab and the browser closes, I don't want to see this site again when I reopen Firefox. Is there a way to achieve this? By the way, this is the standard behavior in Google Chrome.

I searched this forum but couldn't find an answer. I have "restore last session" turned on, but I'd like Firefox wouldn't reopen my last visited site after I close the browser ''by closing the last tab''. In other words: if I close the browser by a regular means (by clicking the rightmost upper X, or by right-clicking the taskbar and choosing close window) it goes to the last viewed site when I reopen the browser – and that's ok – but when I close the ''last tab'' and the browser closes, I don't want to see this site again when I reopen Firefox. Is there a way to achieve this? By the way, this is the standard behavior in Google Chrome.

由ravipegolo于修改

所有回复 (5)

more options

I think your search results (or lack thereof) are correct: I cannot think of a session restore setting that distinguishes between closing a window by using one X button versus the other X button.

Perhaps there should be a new preference (doesn't currently exist) like:

browser.sessionstore.restore_single_tab_window => true by default

During session restore, if Firefox sees that the only window open at shutdown had a single tab, and this preference is set to false, then Firefox would open a new tab and treat that last open tab as a closed tab (the user could restore it from the menu if desired).

Or something like that.

You have many choices to submit feature suggestions, depending on your desired style of interaction:

Discussion Sites/Advocacy

Limited Length Comments

Bug Tracking System

more options

I have this problem too and I'm just quitting Firefox really for this reason. It's kindn of funny but I really want a fresh new start when I open the browser after having closed everything.

more options

Manos said

I really want a fresh new start when I open the browser after having closed everything.

The closest feature is to have Firefox open a new blank tab when you close the last real tab in a window:

(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

I am also disliking this bevahior. I now created a thread here: https://discourse.mozilla.org/t/restore-last-session-but-not-if-i-close-last-tab/74340

more options

You can set browser.startup.page = 0 and leave browser.tabs.closeWindowWithLastTab = true to always start with a blank tab. You will have to restore the previous session manually via the "3-bar" Firefox menu button drop-down list or the History menu.

  • browser.startup.page
    [0:blank; 1:home page; 2:last visited page; 3:restore previous session]