|Tip 55||Save Safari Tabs When Quitting|
Each time Safari starts, it shows the home page (or whatever option you selected under the General tab within Preferences).
However, there’s another start-up mode, and I find it very useful indeed. It will automatically open the tabs (or web page if no tabs are in use) that were active the last time Safari quit. You can do this manually without changing any settings by clicking History→Reopen All Windows From Last Session, and Safari automatically does this should it restart after crashing, but changing the following secret setting makes this an automatic choice upon every start-up of Safari.
Enabling Tab Memory Across Sessions
Quit Safari, open a Terminal window (open Finder, select the Applications list, and then in the list of applications double-click Terminal within the Utilities folder), and type the following:
defaults write com.apple.safari NSQuitAlwaysKeepsWindows -bool TRUE
Restart Safari, then quit it, and then restart it. From this point on, all tabs will be remembered across restarts.
Deactivating Tab Memory
To deactivate this feature later, again quit Safari, open a Terminal window, and type the following:
defaults write com.apple.safari NSQuitAlwaysKeepsWindows -bool FALSE
As earlier, you’ll probably need to start Safari and then quit it before starting it again for the changes to take effect.