Session Restore: Difference between revisions

→‎Preferences: Changed link from http://mxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#750 to https://dxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#828 ref comment in account request
(holy shwt people - give instructions to actually use the damned thing..)
(→‎Preferences: Changed link from http://mxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#750 to https://dxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#828 ref comment in account request)
 
(31 intermediate revisions by 14 users not shown)
Line 1: Line 1:
''Please comment in the Talk page (use the Discussion tab above)''
''Please comment in the Talk page (use the Discussion tab above)''
= How to turn it on =
# Visit <tt>about:config</tt>
# Filter for <tt>browser.startup.page</tt>
# Change it to 3


= Goals & Objectives =
= Goals & Objectives =
Line 35: Line 29:
== Preferences ==
== Preferences ==


* browser.sessionstore.enabled (bool) - Activate the service. Default is true
See [https://dxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#828 the source] for currently available settings and their default values.
 
* browser.sessionstore.enabled (bool) - Activate the service. Default is true. May not appear in about:config until changed. Valid for Firefox 2 and 3, superseded since Version 3.5.
* browser.sessionstore.interval (integer) - minimal interval between saving  operations in milliseconds. Default is 10000.
* browser.sessionstore.max_resumed_crashes (integer) - Number of crashes that can occur before the about:sessionrestore page is displayed. Default is 1. So the user is asked after the second crash which pages he wants to restore.
* browser.sessionstore.resume_from_crash (bool) - Resume sessions post-crash. Default is true.
* browser.sessionstore.resume_from_crash (bool) - Resume sessions post-crash. Default is true.
* browser.sessionstore.resume_session_once (bool) - Resume session at the next application start, but not again. Default is false. This is used for restarting the browser after application updates and extension installation.
* browser.sessionstore.resume_session_once (bool) - Resume session at the next application start, but not again. Default is false. This is used for restarting the browser after application updates and extension installation.
* browser.startup.page = 3 - Resume sessions always. Default is 1 (open to the homepage at browser.startup.homepage)
* browser.startup.page (int) - What is displayed when Browser starts: 0 = blank page; 1 = homepage; 3 = previous session. Default is 1. (Note: Firefox exposes this preference in the Startup section of the Main pane of the Options/Preferences dialog.)


= Technical Design =
= Technical Design =
Line 47: Line 45:


* Code location: http://lxr.mozilla.org/seamonkey/source/browser/components/sessionstore/
* Code location: http://lxr.mozilla.org/seamonkey/source/browser/components/sessionstore/
* Data location: File sessionstore.js in profile directory, backup in sessionstore.bak


== Data to be saved ==
== Data to be saved ==
Line 74: Line 73:
The saved session data is also cleared upon receiving the "browser:purge-session-history" notification.
The saved session data is also cleared upon receiving the "browser:purge-session-history" notification.


The data is stored on disk in JSON format. An open question is to whether this should be encrypted in some manner. See the Discussion page for more ideas about this.
The data is stored on disk as a serialized javascript data structure (though it's possible that it will be converted to JSON once that becomes natively supported by Gecko/Spidermonkey). An open question is to whether this should be encrypted in some manner. See the Discussion page for more ideas about this.


= To-do =
= To-do =
Line 98: Line 97:
* Should form state include saving checkbox and selectbox state as well as text input?
* Should form state include saving checkbox and selectbox state as well as text input?


= Misc =
= User-friendly documentation =
 
See this Knowledge Base entry:  http://support.mozilla.com/en-US/kb/Session+Restore


== Relevant Bugs ==
== Relevant Bugs ==
Line 106: Line 107:
* [https://bugzilla.mozilla.org/show_bug.cgi?id=356050 bz356050]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=356050 bz356050]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=328154 bz328154] - Tracking bug for feature inclusion in Fx2
* [https://bugzilla.mozilla.org/show_bug.cgi?id=328154 bz328154] - Tracking bug for feature inclusion in Fx2
 
* [https://bugzilla.mozilla.org/show_bug.cgi?id=343876 Session restore when all last sessions tabs were closed should obey user homepage choice for the initial blank tab]
Older:
Older:


Account confirmers, Anti-spam team, Bureaucrats, canmove, Confirmed users, Module owners and peers, smwadministrator, smwcurator, Administrators, MozillaWiki team, Widget editors
8,216

edits