Safari Session Management

Ever since Safari 3, the History Menu added “Reopen Last Closed Window” and “Reopen All Windows from Last Session”. The session information is stored inside ~/Library/Safari/LastSession.plist. When Safari crashes, the crash causing tab will typically be opened again, and Safari will crash again. Download the “LastSession” python script from radiotope to get a list of the Safari sessions that were last active.

For easiest use, download the LastSession python script, make it executable, and save it to your /usr/bin or /usr/local/bin folder:

chmod 755 ~/Downloads/readLastSession..py
sudo mv ~/Downloads/readLastSession..py /usr/bin/lastsession

You can also use the Window/Merge All Windows command followed by Bookmarks “Add Bookmark for These 99 Tabs” to easily save you’re entire workspace.

Mac OS X Hints posted about creating “Time Machine” like Session History for Safari by storing version history of the ~/Library/Safari/LastSession.plist file. Version history can be combined with the “readsession” script to get an even longer list of URLs…

There are currently three session management options for Safari, all of which have been updated to work with Safari v4.0.

  • SAFT: InputManager plugin, SIMBL plugin, or Safari Launcher. $15.

    • Add bookmark folder here and add bookmark here in every bookmark menus
    • Save and load browser windows
  • Safari Stand: SIMBL plugin. Free.

    • Bookmark Shelf for visually managing multiple browsing sessions
    • Restore Last Workspace Window that is 100% crash proof
  • GLIMS: Free.

    • Re-open last session when Safari starts
    • Re-open tabs in single window
    • Undo Close Tab (CMD+Z)
    • Unfortunately, GLIMS “re-open last session” is only updated when Safari exits, so it doesn’t protect you when Safari crashes. GLIMS provides a ton of interesting options, primarily related to the Safari “Search Field”, but doesn’t do much in the way of Session Management.
  • Forget Me Not: SIMBL plugin. Open Source. Free.

    • Reload windows and tabs when you relaunch Safari
    • File / Unclose Window
    • Edit / Undo Close Tab
    • Forget Me Not is about making Safari easier to use, rather than specifically about managing your session in Safari.

Bottom line: The only plugin that really brings Saft session management to the next level is Saft.

To minimize Safari crashes, you can also use the excellent Click To Flash plugin, which has the pleasant side effect of forcing Youtube to play back in QuickTime rather than Flash.

Next project: Synchronize Safari sessions across multiple machines

One thought on “Safari Session Management”

Leave a Reply

Your email address will not be published. Required fields are marked *