Why did my saved sessions disappear when I reset Safari or cleared its history?

The option to remove website data, available when either resetting Safari or clearing its history, will delete extension data without warning. Some third-party cache cleaners may do the same. It is recommended to take care when using these tools, as any data so deleted can only be recovered from a backup.

How do I recover Sessions data from a Time Machine or other backup?

If you are familiar with the command line, try using the sessions-export script. This is the recommended procedure.

Alternatively, it is possible to physically replace the database file with a backup. The .db file under the directory ~/Library/Safari/Databases/safari-extension_yoo.david.sessions-deub45nr9t_0/ can be replaced by a recovered file if the latter is renamed to match the file it replaces.

How do I rename a session?

Click the session's name in the sidebar while it is selected, or right-click/Control-click it and choose "Rename Session…".

Why aren't some pages, such as file:// URLs, saved?

Safari Extensions cannot see or read non-HTTP/HTTPS URLs. These URLs are ignored in the manager and marked as "Unknown" in the overview.

Why aren't autosaves working as expected?

It is understandable to assume that a setting entitled "autosave interval" would automatically create new saved sessions whenever said interval elapses, and to be surprised when that is not the case.

At the time when Sessions was first written, OS X's TextEdit application had an autosave mechanism that guarded against data loss. This is what Sessions's autosave feature is modeled after, in form and function. Autosaves in Sessions are internal backups of the current session that are not automatically added to saved sessions but are used, instead, for crash recovery: if Safari or your computer terminates unexpectedly, your last session will reflect the last autosave, so you will not lose more than an interval's worth of browsing history.

I considered actually saving new sessions at the selected interval, but ultimately rejected that implementation because it would rapidly clutter the sidebar and database with largely identical, largely meaningless backups.

Beginning with Sessions 1.4, autosaves have an additional role: Sessions can optionally maintain an internal cache of recent autosaves, automatically pruned of immediate duplicates. These are accessible in the session manager by clicking the disclosure arrow next to Latest Session (if there are no available autosaves, the arrow will not appear). These recent autosaves begin when Sessions is initialized, and a static snapshot is taken when the session manager page is opened (meaning that their contents for any particular session manager page will not change unless it is reloaded). I believe that this solution provides the best of both worlds: you have a record of recent sessions that you can browse and save by choice, without having to periodically clean them from your saved sessions.

Why are importing and exporting implemented the way they are?

Safari Extensions cannot write to regular files on users' systems. The ability to backup, restore, and transfer sessions is therefore currently implemented through the copy and paste mechanism, with which they can then be saved to a file or email. Data can be imported as long as it is validly formatted.

What affordances are provided for keyboard control?

Sessions supports global hotkeys to display either the manager page or the overview popover. These can be enabled and configured in Sessions's preferences, pursuant to the limitations described in the following question.

In the main session manager interface, holding down the Option key will highlight saved sessions in the sidebar that have been favorited and will also change the Restore button to Replace, which closes all open tabs before restoring the session. Further keyboard shortcuts are as follows:

Session manager
Action Shortcut
Delete selected session ⌘⌫(when sidebar is focused)
Select previous session ⌃⌥↑
⌃⌥K
(when sidebar is focused)
Select next session ⌃⌥↓
⌃⌥J
(when sidebar is focused)
Expand recent autosaves (when Latest Session is focused)
Collapse recent autosaves (when Latest Session is focused)
Focus search field ⌃⌥S
Toggle local/global search scope ⌃⌥Z
Mark session as Favorite ⌃⌥F
Toggle tab count badge ⌃⌥C

In the tab overview, holding down the Option key will show tab URLs instead of titles. Normal Safari shortcuts to change tabs will work, for the most part. Searching within the overview is performed simply by typing. The selected (as opposed to active) tab in this search mode is highlighted with a cursor, and can be acted upon with the following shortcuts:

Overview search
Action Shortcut
Toggle inline filter ⌃⌥;
Select previous tab ⌃⌥↑
⌃⌥K
Select next tab ⌃⌥↓
⌃⌥J
Close selected tab ⌃⌥⌫
Activate selected tab

The ⌃⌥ chord is awkward, but was chosen because it is the Safari default for access key shortcuts and does not interact much with text input.

What are some limitations of the optional keyboard shortcuts?

The shortcut functionality for showing the Sessions manager and overview is admittedly suboptimal, as hotkeys are not directly supported by an API. A shortcut will only function from a fully loaded external webpage, and even then only if the page is not under an Apple domain and the keyboard focus is not within the browser chrome (e.g., the address bar or Reader) or an embedded iframe.

Is Sessions open source?

No. I mulled the issue for years and ultimately decided against open-sourcing Sessions, for a number of reasons.

Sessions has always been source-available in that its code ships unminified and unobfuscated. I have encouraged technically-minded users who wished to modify Sessions for their personal use to do so, but I do not support the redistribution of these modifications.

If there are any new developments after I lose the ability to update Sessions, in this regard or any other, I will post them to the homepage.

Can Sessions modify its behavior when Private Browsing is enabled?

From Safari 6 to Safari 8, Sessions stops autosaving open tabs when Private Browsing is enabled, preventing them from being inadvertently recorded (manual saving is still allowed).

Safari 9 changed the granularity of Private Browsing to Private Windows, and Sessions has adjusted its behavior concomitantly: autosaving will no longer pause, but private tabs will be recorded neither automatically nor manually.

Earlier versions of Safari do not include the necessary API to detect Private Browsing and cannot support this. The only global solution on those versions is to manually disable extensions, either individually or entirely, while in this mode.

How does Sessions respect my privacy?

Sessions operates entirely client-side, meaning that all of its data is always local to your machine and ultimately under your control. It performs no tracking beyond internally noting open URLs, the bare minimum for its functionality. There are no analytics or records available to me regarding anything associated with Sessions unless a user sends me an email.

The best guarantee of your privacy is my personal indifference. I have zero interest in users' Sessions data, now and forever, and you have every right to keep it private.