![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
Why can’t I disable “restore previous session”?
Starting a few days ago, about 75% of the time I open my browser, the option to restore the previous session is there but history is not. I have my preferences set to erase all history upon closing the browser. It never did this before. However, it is inconsistent. Sometimes, when I click on it, my start page reloads and "restore previous session" disappears. Other times, my previous tabs open up if I click on it. If I close the browser and open it two to four times, "restore previous session" finally disappears. I have my preferences set to erase everything when I close Firefox but a few times, not only was “restore previous session” available but my history was not erased. I have checked those preferences repeatedly.
The day this started, I did extensive web searches to find a solution. I entered about:config and set the crash recovery to False, as recommended (browser.sessionstore.resume_from_crash). Obviously, this did not solve the problem. Earlier today, I went to Show Folder in Troubleshooting and deleted two prefs.js files that Mozilla recommended to get rid of when preferences won't stick. After I did this, I opened my browser on about four occasions and "restore previous session" did not appear. I thought I had fixed the problem. Nope. Just now, I had a terrible shock. "Restore previous session" was there again and when I clicked on it, it loaded my Gmail Inbox, which I had definitely signed out of earlier. I wasn't even prompted to log in.
I can understand it giving me the login page for Gmail but to open up my Inbox is horrifying! I do three malware and virus scans on my PC every day. I recently did a special scan that said my PC was not vulnerable to being hacked and had good security.
I just checked that Show Folder and there is a new file that was not there four hours ago: prefs.js. The other two that I deleted earlier today are still in my Recycle Bin so I could restore them. They are: prefs-1.js and prefs.js I have not deleted any more prefs.js files. The Mozilla help page said Firefox might create a new prefs.js file if it needs it. So why tell us to delete it to stop this annoying problem?
After I deleted the prefs.js files, I went into Privacy to make sure my settings were okay. As I said, I had no problem the first three or four times I opened the browser after both deleting the prefs.js files and checking my preferences. This new issue with it opening my Gmail Inbox happened just now. By the way, a while back, I deleted (but still have it in the Recycle Bin) a user.js file to stop web addresses from remaining in the Location bar after closing my browser. If this were the problem, I would have had this issue a long time ago, not in the last few days.
I refreshed Firefox, reset my preferences, and this did not fix the problem. I made sure the browser.sessionstore.resume_from_crash was still set to False. I also set my privacy level from 0 to 2 with about:config (browser.sessionstore.privacy_level). I lost the link of where I read to do this.
I am absolutely fed up with this. Why doesn’t Firefox just make it simple and give us the option of shutting off the restore feature if we want to? Obviously, if you set it to Private Browsing, this prevents the restore previous session option from appearing. However, it means that you have no history while browsing and this is not something I want. I have to have my history as I refer to it all the time. The only thing I can think of to prevent anyone from seeing my browsing and history but to have my history available as I’m browsing is to clear everything but cookies under Clear Recent History. Ridiculous!
Just now, I checked and the crash configuration was back to True. I set it to False again. It seems, all of a sudden, I can’t get any settings to take hold in Firefox.
All Replies (14)
My first question in here. Just found out we can't edit them. I meant to say, clear recent history right before closing the browser.
I don't know that there is a way to completely stop Firefox from creating a session history file in normal browsing windows. To minimize the issues that might arise should someone other than you restore your session, you can:
- Set both of these preferences to 2 to avoid having live session cookies saved in the file:
- browser.sessionstore.privacy_level => 2
- browser.sessionstore.privacy_level.deferred => 2
- Don't store any closed windows or tabs (however, if you like to re-open windows or tabs during your session, don't zero these out completely):
- browser.sessionstore.max_tabs_undo => 0
- browser.sessionstore.max_windows_undo => 0
- Don't store back button history for restore tabs:
- browser.sessionstore.max_serialize_back => 0
These changes that you make through about:config are saved in prefs.js so if you delete that file, the settings will return to default values.
Finally, I suggest exiting Firefox using the menu instead of the "red X" button. This ensures an orderly shutdown with time for routine maintenance, while the red X button sometimes bypasses file cleanup. Either:
- "3-bar" menu button > "power" button
- (menu bar) File > Exit
Thank you. I already set that first one to 2. I set the second one to 2. By the way, it's browser.sessionstore.privacy_level_deferred. It wouldn't come up under about:config when I entered it as level.deferred.
As I stated, I have not deleted the newest prefs.js file since this morning and I won't delete it again.
I frequently refer back to my history while browsing so I won't set those tabs to 0.
I'm not quite sure what this means: "Don't store back button history for restore tabs" but it seems to be similar to setting the tabs to 0, so I'll leave that alone too.
As I said, this started up a few days ago. Previously, I never even saw the restore option or had any of these problems. My plan to clear recent history is doing the trick, though I wish Firefox worked like it did a few days ago.
Thanks for the tip about shutting down Firefox instead of clicking on the X. I will do that from now on.
Best is to always close all open tabs before closing Firefox and make sure to always log out.
You can set the browser.tabs.closeWindowWithLastTab pref to false on the about:config page to prevent closing the last tab from closing that window and make a close button appear if only one tab is open.
You can set the browser.sessionstore.privacy_level pref to 2 (never) or 1 (non-HTTPS) on the about:config page to disable saving cookies via session restore in the sessionstore.js file. The browser.sessionstore.privacy_level_deferred pref is used when you do not reopen the previous session automatically via "Show my windows and tabs from last time" and uses the same values.
There will always be a new prefs.js appearing because this file stores modified prefs. There shouldn't be a numbered prefs-##.js file.
Thank you too, cor-el, but as I stated twice before, I already set the privacy level to 2. Also, I have always closed all my tabs before closing the browser, therefore how I'm closing the browser is not causing this. I am doing nothing differently than what I've been doing for years. I never had a single problem with Firefox until a few days ago and no matter what I change in about:config or what files I delete in Show Folder, and on and on, I cannot get Firefox to do what it did before.
I'll get have to get into the habit of using Clear Recent History to stop my previous browsing history from remaining after I close Firefox. I remind you that I have, and always have had, my preferences set to erase all history when Firefox closes. As of two days ago, I can no longer have my history erased about 25% of the time. It's as if I never set the preferences to erase history when closing Firefox. And now about 75% of the time, the previous session can be restored.
I am not having any other problems with my PC or the Internet. The fact that the settings work as they used to about 25% of the time and that the problems are inconsistent, like variations on a theme, indicates something is wrong with Firefox.
More proof something is wrong with Firefox: Clicking on "restore previous session" caused my Gmail Inbox to open without me having to log in. It did not just restore the tab with the login page for Gmail, it opened my Gmail account! And yes, I properly signed out of Gmail and closed the tab as I always do. So if I can't find out what's causing this mess, it means my Gmail account is not secure.
heather53 said
Clicking on "restore previous session" caused my Gmail Inbox to open without me having to log in. It did not just restore the tab with the login page for Gmail, it opened my Gmail account! And yes, I properly signed out of Gmail and closed the tab as I always do.
Hmm, closed tabs should not restore themselves. There is up to a 15 second delay in updating the session history file, so if you closed the tab immediately before closing Firefox, that might explain why the tab was restored -- having been recorded as open and not yet marked as closed.
But if you logged out of Gmail, even if Firefox sent the previous session cookies, Google should redirect to the login page, so it doesn't make sense to get right back in. Can we rule out a password manager logging you in automaticlaly?
Use one of these to close Firefox if you are currently doing that by clicking the close X on the Firefox title bar.
- "3-bar" menu button > Exit (Power button)
- Windows: File > Exit
- Mac: Firefox > Quit Firefox
- Linux: File > Quit
jscher2000: I signed out of my Gmail account and closed the tab long before (an hour or more) I closed my browser, not seconds before. About a password manager logging me in automatically - I do not have anything set up to do that and until yesterday, this has never happened before. I have not changed any settings or preferences. "Keep me signed in" is checked by default now. It was ridiculous of Gmail to do this. However, I always uncheck that box just as I did yesterday when this happened. If it happens again, I'll post a new question so we can tackle it.
cor-el: jscher2000 advised me to not click on the X and I replied above that I no longer do that.
Thank you both again.
More inconsistencies...When I went to sign in here, heather53 dropped down as soon as I clicked on the field to type. I signed out, closed my browser, and a while later signed in again and this time, my username did not appear. I didn't change a thing but Firefox behaves as if I have.
Because of all these new problems I'm having, I have been checking my Privacy page and other ones under Tools each time I go online and before I close my browser. And I just saw something changed even though I never did it. The checkmark for Request that sites not track you was missing. I checked that off years ago and have never unchecked it. It would seem I have a gremlin who is sneaking around and changing my settings at whim!
Sometimes you may have to type the first character(s) or reload the page (F5 or Ctrl + F5) to make the drop-down list open.
Previous to this incident, after I close my browser, any usernames I have entered in any site never appear when I click the mouse in the field, or if I refesh the page or start to type the first letter when I open my browser the next time and go back to those sites. And that would be because I have it set to erase everything when I close the browser. This is yet another indication that Firefox is not erasing everything when I close my browser, otherwise the autofil would not work. Yes, it will still autofil IF I have not set it to erase everything. This time, when logging in here, I started typing heather53 and it did not show, nor did it show when I refreshed the page. But about three hours ago, it appeared when I either clicked the mouse pointer in the field or started to type. Settings and preferences are changing every single time I open the browser and they never did this before.
And now my Firefox home page is acting up. The page that has the Google search bar with Google Search and I'm Feeling Lucky tabs under it and Google in Francais, terms of use, etc., at the bottom of the screen, appears but as soon as I start to type in something, one of two things is happening. Again, note the complete inconsistency. Sometimes, it starts to autofil and there is a horizontal band of icons for all the different search engines appearing under the autofil list. I then click the blue tab to begin the search. The other thing it does is the instant I start typing, it turns into the results page even though I did not hit the blue Search button. Previous to about 30 minutes ago, when I started to type in that search bar, NO autofil appeared, NO icons for other search engines appeared, and it did NOT instantly show a results page without my clicking the blue search tab or hitting Enter on my keyboard.
I suppose it could just be a coincidence and about an hour ago Google changed the way their search function works. If not, it's related to these glitches I'm experiencing. I checked to make sure my preferences are still set to open with the Firefox start page. I have not changed any settings.
Again, as with all these other issues, NONE of this happened before. There is something wrong with the way Firefox is functioning for me.
What is your home page? On Google's site, you wouldn't see the Firefox drop-down panel with other search engine buttons, and on Firefox's built-in home page, you wouldn't see an "I feel lucky" button, so definitely you're not seeing the same page each time.
The Google website (www.google.com) can use "Google Instant predictions" to show the result page as soon as you start typing.
The built-in about:home page doesn't support this feature and you need to press Enter to go to the results page.
You can check the home page setting
- Tools > Options > General > Startup: Home page
Firefox supports multiple home pages separated by '|' (pipe) symbols.
Modified