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

搜尋 Mozilla 技術支援網站

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

了解更多

Can I have Firefox ask before closing private windows with multiple tabs?

more options

To better control my browsing history and what sites are allowed to leave behind cookies, I primarily use private windows when I browse. I've used private windows in this manner for years, I find them quite useful, however, this means when I accidentally hit that big X at the top right corner, I have nothing but my horrible memory to rely on in trying to restore some of what was rather suddenly lost.

For years I've had Firefox ask before closing windows with multiple tabs, a feature I've found quite useful. Is there any way I can set Firefox behave the same towards private windows?

Please don't respond with the obvious "just stop using private windows". Were that to be a worthy solution, I wouldn't be asking this. I'm not about to sacrifice the benefits of private windows that motivated me to use them in the first place, I just wanna know if I can prevent the consequential loss of tabs I've experienced from it.

(p.s. I've now twice typed this question out in private windows before accidentally closing them, first trying to open the menu to double check my browser version, and second by hitting CTRL-W)

Thank you all, and I hope you have a wonderful day.

To better control my browsing history and what sites are allowed to leave behind cookies, I primarily use private windows when I browse. I've used private windows in this manner for years, I find them quite useful, however, this means when I accidentally hit that big X at the top right corner, I have nothing but my horrible memory to rely on in trying to restore some of what was rather suddenly lost. For years I've had Firefox ask before closing windows with multiple tabs, a feature I've found quite useful. Is there any way I can set Firefox behave the same towards private windows? Please don't respond with the obvious "just stop using private windows". Were that to be a worthy solution, I wouldn't be asking this. I'm not about to sacrifice the benefits of private windows that motivated me to use them in the first place, I just wanna know if I can prevent the consequential loss of tabs I've experienced from it. (p.s. I've now twice typed this question out in private windows before accidentally closing them, first trying to open the menu to double check my browser version, and second by hitting CTRL-W) Thank you all, and I hope you have a wonderful day.

所有回覆 (1)

more options

Hi Grayvee, there is no feature for that.

The only thing that would prevent the private window from closing immediately is if a page triggered that sometimes annoying dialog about whether you really want to leave the page. You may have seen that on some sites.

I created an extension that lets you set up a page with that dialog in each window you want to protect from closure. If you don't find a better workaround, you could take a look:

https://addons.mozilla.org/firefox/addon/prevent-closing-window/

Of course, in order to address the specific problem, you need to check the box in the installation confirmation to enable the extension in private windows.

P.S. I know the extension sometimes gets confused and opens extra tabs. Sorry about that.