Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Learn More

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

firefox does not restore previous sessions anymore

more options

i turned on Firefox today and found out that it's showing a new session instead of my previous session. which happened right after the update. then after i finished using my PC for the day i chose the option to restore previous sessions instead of showing homepage(i don't have one) then i closed and re-opened Firefox. still showed me a new session.

and i also need to mention got one of those hijacker junkwares which seems like i caught before or after the update (i followed online instructions to remove it) but removing it did not solve this problem.


i'm not sure which one is the reason for the problem. so i would be grateful for any kind of help :)

i turned on Firefox today and found out that it's showing a new session instead of my previous session. which happened right after the update. then after i finished using my PC for the day i chose the option to restore previous sessions instead of showing homepage(i don't have one) then i closed and re-opened Firefox. still showed me a new session. and i also need to mention got one of those hijacker junkwares which seems like i caught before or after the update (i followed online instructions to remove it) but removing it did not solve this problem. i'm not sure which one is the reason for the problem. so i would be grateful for any kind of help :)

Soluzione scelta

Could you double-check that Firefox is actually recording the change you make on the Options page. Here's how:

Part 1: The about:config page

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste start and pause while the list is filtered

(3) Double-check that the browser.startup.page preference is bolded and "user set" to 3 (the value for restoring your previous session windows and tabs). If this preference does NOT show 3 after you make your selection on the Options page, try double-clicking it and setting it to 3 manually. Will it take?

If the preference status is "locked" then we'll need to assist you investigating the source of the lock.

Part 2: The prefs.js file

If about:config is correct, then Firefox also should have recorded that value in the prefs.js file. There may be a few minutes' delay in updating that file on disk. Here's how you can check it:

Open your current Firefox settings (AKA Firefox profile) folder using either

  • "3-bar" menu button > "?" button > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter

In the first table on the page, click the "Show Folder" button. This should launch a new window listing various files and folders in Windows Explorer.

Scroll down to prefs.js, right-click it, and choose Edit. (Do not double-click a .js file, since then Windows will try to execute it in the Windows script interpreter with unpredictable results.)

The file usually will open in Notepad, and it's generally alphabetical, so you can scroll down and look for a line which reads:

user_pref("browser.startup.page", 3);

Is it there?


We have a general support article on possible reasons that a preference change which you make during a session might not actually get saved to disk, or might be ignored or reverted: How to fix preferences that won't save.

We also have noticed that some utility software such as Advanced SystemCare will roll back settings changes between sessions. If you have that or any other software with a home page protection, browser settings protection, or similar feature, try disabling that feature.

Leggere questa risposta nel contesto 👍 1

Tutte le risposte (20)

more options

If Firefox remembers your windows and tabs from the previous session, you can restore it manually using the History menu, History > Restore Previous Session.

However, it probably is "gone" by now.

Firefox does create an extra session backup when installing an update. To try to restore that backup requires several manual steps. If you want to try it, here's now:

From inside Firefox, open your current Firefox settings (AKA Firefox profile) folder using either

  • "3-bar" menu button > "?" button > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter

In the first table on the page, click the "Show Folder" button.

In the window that launches, scroll down and double-click into the sessionstore-backups folder. Save all files here to a safe location, such as your Documents folder. Most likely you'll see one starting with upgrade.js- from the past couple of weeks when Firefox 40.0.3 was installed. You'll have to judge by the recency of the date it was created.

Return to the main level of your profile folder.

Leaving that window open, switch back to Firefox and Exit, either:

  • "3-bar" menu button > "power" button
  • (menu bar) File > Exit

Pause while Firefox finishes its cleanup, then rename sessionstore.js to something like sessionstore.old.

Next, copy the upgrade.js-... file you want to try into this folder and rename the file to sessionstore.js

Note: By default Windows hides the .js extension. To work with file renaming more easily, you can set Windows to show ALL file extension using the method in this article: http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions

Start Firefox back up again. When you use History > Restore Previous Session, it should read in that older file. (Or if your startup setting is to restore automatically, that should happen.)

Does it work?

more options

jscher2000 said

If Firefox remembers your windows and tabs from the previous session, you can restore it manually using the History menu, History > Restore Previous Session. However, it probably is "gone" by now. Firefox does create an extra session backup when installing an update. To try to restore that backup requires several manual steps. If you want to try it, here's now: From inside Firefox, open your current Firefox settings (AKA Firefox profile) folder using either
  • "3-bar" menu button > "?" button > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter
In the first table on the page, click the "Show Folder" button. In the window that launches, scroll down and double-click into the sessionstore-backups folder. Save all files here to a safe location, such as your Documents folder. Most likely you'll see one starting with upgrade.js- from the past couple of weeks when Firefox 40.0.3 was installed. You'll have to judge by the recency of the date it was created. Return to the main level of your profile folder. Leaving that window open, switch back to Firefox and Exit, either:
  • "3-bar" menu button > "power" button
  • (menu bar) File > Exit
Pause while Firefox finishes its cleanup, then rename sessionstore.js to something like sessionstore.old. Next, copy the upgrade.js-... file you want to try into this folder and rename the file to sessionstore.js Note: By default Windows hides the .js extension. To work with file renaming more easily, you can set Windows to show ALL file extension using the method in this article: http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions Start Firefox back up again. When you use History > Restore Previous Session, it should read in that older file. (Or if your startup setting is to restore automatically, that should happen.) Does it work?

thanks for the help. but what i really need is have my firefox automatically restore the previous sessions and not to do it manually.

more options

MeMoTie said

thanks for the help. but what i really need is have my firefox automatically restore the previous sessions and not to do it manually.

Right, of course, that was just to get back the tabs you lost.

If it's not working normally on a day-to-day basis, I think you've already checked some of the key things, but I'll try to summarize:

  • Startup setting: "Show my windows and tabs from last time"
    • If this is not enabled, History > Restore Previous Session still should work
  • Privacy options:
    • Firefox will "Remember history" or "Use custom settings for history" -- not "Never remember history" and not "Always use private browsing mode"
    • If "Clear history when Firefox closes" is enabled, in settings, you are NOT clearing Browsing and download history
    • You can check using "3-bar" menu button (or Tools menu) > Options > Privacy
  • No add-ons that remove history or cookies
    • You can check on the Add-ons page (Ctrl+Shift+a), Extensions section
  • No external utility/security/privacy software cleaning your Firefox settings folder to remove history or cookies
more options

jscher2000 said

MeMoTie said
thanks for the help. but what i really need is have my firefox automatically restore the previous sessions and not to do it manually.

Right, of course, that was just to get back the tabs you lost.

If it's not working normally on a day-to-day basis, I think you've already checked some of the key things, but I'll try to summarize:

  • Startup setting: "Show my windows and tabs from last time"
    • If this is not enabled, History > Restore Previous Session still should work
  • Privacy options:
    • Firefox will "Remember history" or "Use custom settings for history" -- not "Never remember history" and not "Always use private browsing mode"
    • If "Clear history when Firefox closes" is enabled, in settings, you are NOT clearing Browsing and download history
    • You can check using "3-bar" menu button (or Tools menu) > Options > Privacy
  • No add-ons that remove history or cookies
    • You can check on the Add-ons page (Ctrl+Shift+a), Extensions section
  • No external utility/security/privacy software cleaning your Firefox settings folder to remove history or cookies

okay, i just re-checked all of that. history is still there, bookmarks are still there and my plugins did not change(check system details) but the weird thing is, when i close and reopen firefox the setting to restore session reverts back to "show my homepage"

i guess that's the cause of the problem.

more options

Soluzione scelta

Could you double-check that Firefox is actually recording the change you make on the Options page. Here's how:

Part 1: The about:config page

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste start and pause while the list is filtered

(3) Double-check that the browser.startup.page preference is bolded and "user set" to 3 (the value for restoring your previous session windows and tabs). If this preference does NOT show 3 after you make your selection on the Options page, try double-clicking it and setting it to 3 manually. Will it take?

If the preference status is "locked" then we'll need to assist you investigating the source of the lock.

Part 2: The prefs.js file

If about:config is correct, then Firefox also should have recorded that value in the prefs.js file. There may be a few minutes' delay in updating that file on disk. Here's how you can check it:

Open your current Firefox settings (AKA Firefox profile) folder using either

  • "3-bar" menu button > "?" button > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter

In the first table on the page, click the "Show Folder" button. This should launch a new window listing various files and folders in Windows Explorer.

Scroll down to prefs.js, right-click it, and choose Edit. (Do not double-click a .js file, since then Windows will try to execute it in the Windows script interpreter with unpredictable results.)

The file usually will open in Notepad, and it's generally alphabetical, so you can scroll down and look for a line which reads:

user_pref("browser.startup.page", 3);

Is it there?


We have a general support article on possible reasons that a preference change which you make during a session might not actually get saved to disk, or might be ignored or reverted: How to fix preferences that won't save.

We also have noticed that some utility software such as Advanced SystemCare will roll back settings changes between sessions. If you have that or any other software with a home page protection, browser settings protection, or similar feature, try disabling that feature.

more options

there's two prefs.js folders. and both are ones that i can't edit. one says prefs.js.bak and one says prefs.js.new.

i just deleted all prefs and i still can't apply my preferences. i don't have any programs that do anything related to home pages. i'll reinstall firefox and see what happens from there.

UPDATE: i reinstalled firefox. still the same problem.

Modificato da MeMoTie il

more options

There's no regular prefs.js file? If Windows hides .js extensions, it would just be prefs -- you can force Windows to show all extensions using the steps in this article: http://windows.microsoft.com/en-us/wi.../show-hide-file-name-extensions.

What were the dates on those other prefs files? If they are recent or updating in real time, I suspect some other software is modifying Firefox.

more options

You can check for problems with the sessionstore.js file in the Firefox profile folder that stores session data. Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost and you will have to recreate them (make a note or bookmark them if possible).

You can use this button to go to the current Firefox profile folder:

Windows hides some file extensions by default. Among them .html and .ini and .js and .txt and you may only see a file name without file extension. You can check the file extension (type) in the properties of the file in Windows Explorer via the right-click context menu.

more options

jscher2000 said

There's no regular prefs.js file? If Windows hides .js extensions, it would just be prefs -- you can force Windows to show all extensions using the steps in this article: http://windows.microsoft.com/en-us/wi.../show-hide-file-name-extensions. What were the dates on those other prefs files? If they are recent or updating in real time, I suspect some other software is modifying Firefox.

there's more than one prefs.js file now. they start as prefs-1 and continue up till a random number. i moved them just now and they were up to 15 and now they're up to 22. the prefs files i removed at first when i first opened that folder are dated for today. seems like a software is modifying firefox. but, i don't know which one. since all of my installations are gaming related and i have no antiviruses on my PC it could be a hidden one? how do i find it?

more options

cor-el said

You can check for problems with the sessionstore.js file in the Firefox profile folder that stores session data. Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost and you will have to recreate them (make a note or bookmark them if possible). You can use this button to go to the current Firefox profile folder: Windows hides some file extensions by default. Among them .html and .ini and .js and .txt and you may only see a file name without file extension. You can check the file extension (type) in the properties of the file in Windows Explorer via the right-click context menu.

now here's a weird thing, they were never hidden. and i saw sessionstore.js and now it's...gone.. it turned into a .bak file. should i try to turn it into a .js again? or should i just delete it?

more options

MeMoTie said

there's more than one prefs.js file now. they start as prefs-1 and continue up till a random number. i moved them just now and they were up to 15 and now they're up to 22. the prefs files i removed at first when i first opened that folder are dated for today. seems like a software is modifying firefox. but, i don't know which one. since all of my installations are gaming related and i have no antiviruses on my PC it could be a hidden one? how do i find it?

The numbered prefs files indicate that prefs.js is locked or corrupted and can't be updated. Firefox then creates a new numbered prefs file. Unfortunately, Firefox doesn't actually use the numbered file at the next startup, so you need to recover the updated settings manually as follows:

After closing Firefox, try deleting prefs.js and renaming the latest prefs-nn.js to prefs.js. After starting Firefox, hopefully it will be able to update that one. If not, there may be a permissions problem. Hopefully there are suggestions to deal with that in the article I linked to earlier.

more options

MeMoTie said

i saw sessionstore.js and now it's...gone.. it turned into a .bak file. should i try to turn it into a .js again? or should i just delete it?

When Firefox starts up, it reads sessionstore.js and then removes it. So it's normal for it to disappear. The sessionstore.bak file normally is very old since it no longer is used in the last several versions of Firefox. You can ignore or remove the sessionstore.bak file.

more options

jscher2000 said

MeMoTie said
there's more than one prefs.js file now. they start as prefs-1 and continue up till a random number. i moved them just now and they were up to 15 and now they're up to 22. the prefs files i removed at first when i first opened that folder are dated for today. seems like a software is modifying firefox. but, i don't know which one. since all of my installations are gaming related and i have no antiviruses on my PC it could be a hidden one? how do i find it?

The numbered prefs files indicate that prefs.js is locked or corrupted and can't be updated. Firefox then creates a new numbered prefs file. Unfortunately, Firefox doesn't actually use the numbered file at the next startup, so you need to recover the updated settings manually as follows:

After closing Firefox, try deleting prefs.js and renaming the latest prefs-nn.js to prefs.js. After starting Firefox, hopefully it will be able to update that one. If not, there may be a permissions problem. Hopefully there are suggestions to deal with that in the article I linked to earlier.

did that and windows told me the file already exists. messed around with folder options and found out that this is a "system file".

i deleted it and named the latest into prefs-nn.js to prefs.js and firefox is creating more of them again. every time i change something in the options page. and they're all empty. looks like firefox is trying to make one where it can put actual letters and numbers in but still unable to.

Modificato da MeMoTie il

more options

i actually fixed it! i opened the prefs.js file and pasted in "user_pref("browser.startup.page", 3);" and BOOM. it worked. firefox wrote in everything in that file and it fixed itself. thank you for that line! :D

btw isn't this a type of problem that can be fixed within a next update?(wthout requiring people to manually fix it i mean)

Modificato da MeMoTie il

more options

MeMoTie said

... messed around with folder options and found out that this is a "system file".

i deleted it and named the latest into prefs-nn.js to prefs.js and firefox is creating more of them again. every time i change something in the options page. and they're all empty. looks like firefox is trying to make one where it can put actual letters and numbers in but still unable to.

Could I suggest pausing on a possible deep dive into Windows' permissions/privileges to shut down and restart Windows? Occasionally after updates Windows will start up in a phantom user profile where Firefox does not work correctly for no apparent reason. Clearly you are not in a new profile, but there is something very wrong with permissions and privileges that could be a transient glitch.

more options

jscher2000 said

MeMoTie said
... messed around with folder options and found out that this is a "system file".

i deleted it and named the latest into prefs-nn.js to prefs.js and firefox is creating more of them again. every time i change something in the options page. and they're all empty. looks like firefox is trying to make one where it can put actual letters and numbers in but still unable to.

Could I suggest pausing on a possible deep dive into Windows' permissions/privileges to shut down and restart Windows? Occasionally after updates Windows will start up in a phantom user profile where Firefox does not work correctly for no apparent reason. Clearly you are not in a new profile, but there is something very wrong with permissions and privileges that could be a transient glitch.

i have been detecting weird things with my windows and this is not the first thing tbh.. but it's not preventing me from using my PC and i have backups of all of my files so I'm sure it's fine. don't think that this happened with my latest update but it's completely possible that the hijack junkware or whatever it's name did this. also that file is not a system file anymore since it's fixed.

Modificato da MeMoTie il

more options

If you have multiple numbered prefs-##.js files then this means that there is a problem with the main prefs.js file. A possible cause is security software that is locking files against changes.

What security software do you have?


There shouldn't be a sessionstore.bak file as this file is used in current Firefox releases. Only the sessionstore.js file is used to restore to previous session.

more options

cor-el said

If you have multiple numbered prefs-##.js files then this means that there is a problem with the main prefs.js file. A possible cause is security software that is locking files against changes. What security software do you have?

There shouldn't be a sessionstore.bak file as this file is used in current Firefox releases. Only the sessionstore.js file is used to restore to previous session.

i don't have one. i don't use a "security" software other than anti malware, adware and junkware programs. i only run them when i need them but other than that they're always turned off.

the problem has been solved btw.

Modificato da MeMoTie il

more options

jscher2000 said

If Firefox remembers your windows and tabs from the previous session, you can restore it manually using the History menu, History > Restore Previous Session. However, it probably is "gone" by now. Firefox does create an extra session backup when installing an update. To try to restore that backup requires several manual steps. If you want to try it, here's now: From inside Firefox, open your current Firefox settings (AKA Firefox profile) folder using either
  • "3-bar" menu button > "?" button > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter
In the first table on the page, click the "Show Folder" button. In the window that launches, scroll down and double-click into the sessionstore-backups folder. Save all files here to a safe location, such as your Documents folder. Most likely you'll see one starting with upgrade.js- from the past couple of weeks when Firefox 40.0.3 was installed. You'll have to judge by the recency of the date it was created. Return to the main level of your profile folder. Leaving that window open, switch back to Firefox and Exit, either:
  • "3-bar" menu button > "power" button
  • (menu bar) File > Exit
Pause while Firefox finishes its cleanup, then rename sessionstore.js to something like sessionstore.old. Next, copy the upgrade.js-... file you want to try into this folder and rename the file to sessionstore.js Note: By default Windows hides the .js extension. To work with file renaming more easily, you can set Windows to show ALL file extension using the method in this article: http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions Start Firefox back up again. When you use History > Restore Previous Session, it should read in that older file. (Or if your startup setting is to restore automatically, that should happen.) Does it work?
more options

I also have "lost" my previous sessions after a Firefox crash and restart. There is no "Previous Session Restore" available under the History selection.

Your proposed solution doesn't seem to align with what I am seeing when I access the Firefox Profile Folder. The only two files in my Sessionstore-backups folder are "Recovery.bak" and "Recovery.js". Are these two files the equivalent of your sessionstore.js and upgrade.js? if not, where and how do I access the two files you mentioned - especially since sessionstore.js and upgrade.js are not in my Sessionstore-backups folder!

Also, if I try to access the Sessionstore-backups folder directly, using the path C:\Users\Larry\AppData\Roaming\Mozilla\Firefox\Profiles\cjeg81qn.default\sessionstore-backups (cut and pasted from Windows), I discover that I have no "AppData" folder at all. Is this a "hidden" folder?

Your help/update will be very much appreciated.

  1. 1
  2. 2