为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

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

详细了解

Don't restore last tab with "Restore previous session" enabled.

  • 6 个回答
  • 2 人有此问题
  • 1 次查看
  • 最后回复者为 sadolino

more options

I have the option "Restore previous session" enabled, and the option "browser.tabs.closeWindowWithLastTab" true. With these options set, when I close the final tab, the Firefox window closes as expected. However when I re-launch Firefox with the desktop icon, the last closed tab opens itself again. Instead, there should be a blank/home tab open. Since I closed the *tab* and not the * window*, the "previous session" should be empty. Is there any way to enable this behavior?

I have the option "Restore previous session" enabled, and the option "browser.tabs.closeWindowWithLastTab" true. With these options set, when I close the final tab, the Firefox window closes as expected. However when I re-launch Firefox with the desktop icon, the last closed tab opens itself again. Instead, there should be a blank/home tab open. Since I closed the *tab* and not the * window*, the "previous session" should be empty. Is there any way to enable this behavior?

所有回复 (6)

more options

You wanna close the tab and then the firefox window close completely, or how I can understand it better ?

more options

Quaraxkad said

What if you leave a 'New' Tab next to the 'Last' Tab you close. Does it restore your session with just the one New Tab?


~Pj

more options

Maybe use a desktop shortcut that opens the about:blank page when you do not want to restore the previous session.

more options

Pj said

What if you leave a 'New' Tab next to the 'Last' Tab you close. Does it restore your session with just the one New Tab?

If there are more than one tabs open when I close the window, then both tabs do re-open on launch. The issue only occurs when I close the final tab, which in effect closes the entire program window since I have "closeWindowWithLastTab" enabled.


cor-el said

Maybe use a desktop shortcut that opens the about:blank page when you do not want to restore the previous session.

That won't exactly work, because the desktop icon is not the only way that the program is launched. For example if I were to click a .url shortcut icon, or another program launches a browser instance then that previous undesired single-tab session will still be restored.

sadolino said

You wanna close the tab and then the firefox window close completely, or how I can understand it better ?

I'll try to explain how it works in a different browser, maybe it will make more sense... Using Opera Presto (v12.17 and older) as the example. I'm trying to duplicate this behavior as closely as possible.

Let's say I have 5 tabs open in Opera. If I close the whole Opera window, the next time it is launched (regardless of how) all 5 of those tabs will be restored. If a url was passed as an argument it will open that url in a 6th tab. This is *basically* what enabling "Restore previous session" does in Firefox.

Now let's say I have only 1 Opera tab open. If I close the whole window, the next time I launch Opera that one tab will be restored. However, if I instead close that one tab, the next time Opera launches it will *not* restore the tab.

Conversely, Firefox works properly when closing the window, but the final scenario is where it fails. I have a Firefox window open with 1 tab. If I close the window, the next time Firefox launches it restores that tab, which is good). But if I close the tab, the next time Firefox launches it restores that tab. It should not. (Truthfully I'm pretty sure that Opera Presto is still the only browser to do this correctly!)

more options

Someone in the firefox IRC channel referred me to this 10-year old bug report, still unresolved. https://bugzilla.mozilla.org/show_bug.cgi?id=492383

more options

Yes, you are right that it isn't right.

Did you try to make a backup of firefox and uninstall it with all folders and registry entries ?

Then try a new install.

由sadolino于修改