MacOS – Safari, Yosemite: Where is “Reopen all windows from last session” stored

macossafari

Title wraps up the whole thing, but to elaborate I have an applescript that deletes Safari's history folder, bookmark folder, and a few other boot cache items, but quitting Safari, running the script, then re-opening Safari I can still choose "Reopen All windows from last session" and get the very last page from the site I was just at – where is this info stored? If my gf catches me looking at porn again I could be in hospital for a month or more!

Best Answer

It's stored in ~/Library/Safari/LastSession.plist, where ~ is your home folder of course.