Session Restore: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
m (→‎Always restore sessions on start: File -> Quit on Linux)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Firefox 2 comes with a built in Session Store feature that saves your session data including open windows and tabs, window size and position, and text typed in forms.  Session data is stored in the "sessionstore.js" file, located in the [[profile folder]].  To disable this feature, set [[browser.sessionstore.enabled]] to "false".  
:''This article was written for Firefox but also applies to SeaMonkey 2.''


== Default behavior ==
Starting in  Firefox 2,  a built-in Session Store feature saves your session data, including open windows and tabs, window size and position, and text typed in forms.  Session data is stored in the [[sessionstore.js]] file, located in the [[profile folder]]. 
Firefox will offer to restore your session after a crash. It will automatically restore your session after an automatic update, or when using the restart button from the Add-ons Manager.
 
==Default behavior==
Firefox  will automatically restore your session after an automatic update, or when using the restart button from the Add-ons Manager. Firefox will offer to restore your session after a crash or other unexpected close. 
 
Starting in Firefox 3.5,  Firefox automatically restores your session after one crash.  If it crashes again,  Firefox displays an error page offering to restore the previous session or start a new session.  [https://bugzilla.mozilla.org/show_bug.cgi?id=448976#c10] 


== Always restore sessions on start ==
== Always restore sessions on start ==
By default this feature is off, but can be turned on from the Options/Preferences menu.  In the Main panel, under Startup set "When Firefox starts" to "Show my windows and tabs from last time".  This will have Firefox restore your tabs and form data to their state when Firefox closed (the related preference is [[browser.startup.page]]).
By default this feature is off, but can be turned on from the [[Menu_differences_in_Windows,_Linux,_and_Mac|Options/Preferences]] menu.  In the Main panel, under Startup, set "When Firefox starts" to "Show my windows and tabs from last time".  This will have Firefox restore your tabs and form data to their state when Firefox closed (the related preference is [[browser.startup.page]]).


If you want Firefox to restore multiple windows you need to close Firefox via File -> Exit.  Closing the windows one at a time will cause Firefox to only restore the last window that was closed.
If you want Firefox to restore multiple windows you need to close Firefox via "File -> Exit" ("File -> Quit" on Linux, "Firefox -> Quit Firefox" on Mac OS).  Closing the windows one at a time will cause Firefox to only restore the last window that was closed.


== Restoring a session once ==
== Restoring a session once ==
Set [[browser.sessionstore.resume_session_once]] to "true" in [[about:config]] and it will restore your session the next time you start Firefox, but not again.
Set [[browser.sessionstore.resume_session_once]] to "true" in [[about:config]] and it will restore your session the next time you start Firefox, but not again.


== Firefox keeps crashing after restoring a session ==
== Restoring a session after a crash==
If a site's content caused your crash (e.g., a plugin is crashing) restoring your session may restore that page and cause Firefox to crash again. If Firefox keeps crashing after choosing "Restore Session," choose "Start New Session."


If a site's content caused your crash (e.g. a plugin is crashing) restoring your session may restore that page and cause Firefox to crash again. If Firefox keeps crashing after choosing "Restore Session," choose "Start New Session."
Starting in Firefox 3.5, Firefox automatically restores your previous session  after one crash (or unexpected close). If Firefox crashes a second time, a "Restore Session" error page is displayed, asking whether to restore the last session or start a new session. If you do not want Firefox to automatically restore your session after one crash, set the preference [[browser.sessionstore.max_resumed_crashes]]  to '''0''' (default is '''1''').  [https://bugzilla.mozilla.org/show_bug.cgi?id=448976#c12]  [http://mxr.mozilla.org/mozilla1.9.1/source/browser/app/profile/firefox.js#751]


== Disable ==
=== Troubleshooting ===
If neither your old session nor the Restore Session error page appears after a crash, or you accidentally click on “Start New Session”, you can enter '''about:sessionrestore''' in the [[Location Bar]] (address bar)  to force the Restore Session page to appear, after first restoring a backup file to restore the old session data.  The session data is stored in [[sessionstore.js]]; this file can be restored (while Firefox is not running) from backups, including "sessionstore.bak".  The file "sessionstore.bak" is created if you launch Firefox after a crash has occurred. It is a copy of the current sessionstore.js that gets lost otherwise, if you restart Firefox. [http://forums.mozillazine.org/viewtopic.php?p=4655235#p4655235]


To disable the crash recovery feature, set [[browser.sessionstore.resume_from_crash]] to false:
== Disabling crash recovery ==
* Type about:config in the Location Bar
To disable the crash recovery feature, set [[browser.sessionstore.resume_from_crash]] to false in [[about:config]]:
* Type about:config in the Location Bar
* Press Enter
* Press Enter
* Find browser.sessionstore.resume_from_crash
* Find browser.sessionstore.resume_from_crash
* Double click to set it to false
* Double click to set it to false


To completely disable all session saving behavior, including the recording of session information, set [[browser.sessionstore.enabled]] to false:
==Completely disabling session store==
* Type about:config in the Location Bar
'''Firefox 3 and below:''' To completely disable all session saving behavior, including the recording of session information, set [[browser.sessionstore.enabled]] to false in [[about:config]].
* Press Enter
 
* Find browser.sessionstore.enabled
'''Firefox 3.5 and above:''' Starting in Firefox 3.5 the preference '''browser.sessionstore.enabled''' is no longer used. [https://bugzilla.mozilla.org/show_bug.cgi?id=449596]  Instead,  you can set the preferences [[browser.sessionstore.max_tabs_undo]] and [[browser.sessionstore.max_windows_undo]] to '''0'''.
* Double click to set it to false


==Privacy implications==
==Privacy issues==
The Session Restore functionality provided in Firefox 2 will restore connections to services which use session cookies to maintain login state such as GMail. It is recommended that users with concerns about the privacy implications of this behavior disable the crash recovery feature by changing the value of [[browser.sessionstore.resume_from_crash]] to false, as explained above.  [http://www.mozilla.com/en-US/firefox/2.0/releasenotes/#issues]
Session Restore will restore connections to services which use session [[cookies]] to maintain login state, such as [http://mail.google.com GMail].  If someone else uses your computer after you, that person could access your personal information on those sites. If this is a concern, you should not enable the "Show my windows and tabs from last time" option [[#Always restore sessions on start|described above]].


==Related bug reports==
You may also wish to disable the Session Restore crash recovery feature  by changing the value of [[browser.sessionstore.resume_from_crash]] from true (default) to to '''false''' ([[#Disabling crash recovery|explained above]]).   This will prevent another user from restoring a previous session when Firefox is opened after a crash or other unexpected close, such as system shutdown while Firefox is running.
*[https://bugzilla.mozilla.org/show_bug.cgi?id=333907 Bug 333907 - XRE quits too abruptly when Windows is shut down]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=342885 Bug 342885 - Session restore launches even when I haven't crashed]


==External links==
==External links==
*[http://wiki.mozilla.org/Session_Restore Session Restore] at wiki.mozilla.org
*[https://support.mozilla.com/kb/Session+Restore Session Restore (Firefox Support)]
*[http://developer.mozilla.org/en/docs/Session_store_API Session store API] at developer.mozilla.org
*[https://wiki.mozilla.org/Session_Restore Session Restore - MozillaWiki]  
*[http://forums.mozillazine.org/viewtopic.php?t=47184 Discussion of the SessionSaver extension for Firefox]
*[https://wiki.mozilla.org/Firefox3.1/AboutSessionrestore_Security_Review Firefox3.1/AboutSessionrestore Security Review - MozillaWiki]
*[https://developer.mozilla.org/en/Session_store_API Session store API - MDC]
 
===Related bug reports===
*[https://bugzilla.mozilla.org/show_bug.cgi?id=333907 Bug 333907 - XRE quits too abruptly when Windows is shut down]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=448976  Bug 448976 -  turn the Session Restore prompt into an error page]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=481400  Bug 481400 -  Sessionrestore should ask after first crash and not after second one by default]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=449596  Bug 449596 -  remove the browser.sessionstore.enabled pref]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=501995  Bug 501995 -  Not prompted for session restore after force-quitting due to lock-up]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=507868 Bug 507868 - annoying and alarming behavior durning session restore when lots of tabs and windows were open in previous session]


[[Category:Startup - Firefox]]
[[Category:Startup - Firefox]] [[Category:SeaMonkey]]

Latest revision as of 16:12, 13 June 2010

This article was written for Firefox but also applies to SeaMonkey 2.

Starting in Firefox 2, a built-in Session Store feature saves your session data, including open windows and tabs, window size and position, and text typed in forms. Session data is stored in the sessionstore.js file, located in the profile folder.

Default behavior

Firefox will automatically restore your session after an automatic update, or when using the restart button from the Add-ons Manager. Firefox will offer to restore your session after a crash or other unexpected close.

Starting in Firefox 3.5, Firefox automatically restores your session after one crash. If it crashes again, Firefox displays an error page offering to restore the previous session or start a new session. [1]

Always restore sessions on start

By default this feature is off, but can be turned on from the Options/Preferences menu. In the Main panel, under Startup, set "When Firefox starts" to "Show my windows and tabs from last time". This will have Firefox restore your tabs and form data to their state when Firefox closed (the related preference is browser.startup.page).

If you want Firefox to restore multiple windows you need to close Firefox via "File -> Exit" ("File -> Quit" on Linux, "Firefox -> Quit Firefox" on Mac OS). Closing the windows one at a time will cause Firefox to only restore the last window that was closed.

Restoring a session once

Set browser.sessionstore.resume_session_once to "true" in about:config and it will restore your session the next time you start Firefox, but not again.

Restoring a session after a crash

If a site's content caused your crash (e.g., a plugin is crashing) restoring your session may restore that page and cause Firefox to crash again. If Firefox keeps crashing after choosing "Restore Session," choose "Start New Session."

Starting in Firefox 3.5, Firefox automatically restores your previous session after one crash (or unexpected close). If Firefox crashes a second time, a "Restore Session" error page is displayed, asking whether to restore the last session or start a new session. If you do not want Firefox to automatically restore your session after one crash, set the preference browser.sessionstore.max_resumed_crashes to 0 (default is 1). [2] [3]

Troubleshooting

If neither your old session nor the Restore Session error page appears after a crash, or you accidentally click on “Start New Session”, you can enter about:sessionrestore in the Location Bar (address bar) to force the Restore Session page to appear, after first restoring a backup file to restore the old session data. The session data is stored in sessionstore.js; this file can be restored (while Firefox is not running) from backups, including "sessionstore.bak". The file "sessionstore.bak" is created if you launch Firefox after a crash has occurred. It is a copy of the current sessionstore.js that gets lost otherwise, if you restart Firefox. [4]

Disabling crash recovery

To disable the crash recovery feature, set browser.sessionstore.resume_from_crash to false in about:config:

  • Type about:config in the Location Bar
  • Press Enter
  • Find browser.sessionstore.resume_from_crash
  • Double click to set it to false

Completely disabling session store

Firefox 3 and below: To completely disable all session saving behavior, including the recording of session information, set browser.sessionstore.enabled to false in about:config.

Firefox 3.5 and above: Starting in Firefox 3.5 the preference browser.sessionstore.enabled is no longer used. [5] Instead, you can set the preferences browser.sessionstore.max_tabs_undo and browser.sessionstore.max_windows_undo to 0.

Privacy issues

Session Restore will restore connections to services which use session cookies to maintain login state, such as GMail. If someone else uses your computer after you, that person could access your personal information on those sites. If this is a concern, you should not enable the "Show my windows and tabs from last time" option described above.

You may also wish to disable the Session Restore crash recovery feature by changing the value of browser.sessionstore.resume_from_crash from true (default) to to false (explained above). This will prevent another user from restoring a previous session when Firefox is opened after a crash or other unexpected close, such as system shutdown while Firefox is running.

External links

Related bug reports