2

Do someone know where open private Safari tabs are stored in macOS? I need to recover some tabs that I don't remember, and obviously history is not an option.

Usually they are reopened every time Safari is launched (if the "Safari opens with" preference in Preferences > General is set to "All windows from last session")

But I recently closed Safari and then immediately rebooted the MacBook. Probably too quickly... and maybe Safari didn't have time to write everything to disk.

At next login Safari opened by itself with a single new empty tab (it shouldn't have, because I closed it and "Open at Login" is disabled for Safari. Clearly something was off).

I clicked on History > Reopen All Windows from Last Session, and only the non-private window was restored. I tried to restore the LastSession.plist file from backup but just the same window opens, it looks like private tabs are not there.

Private tabs have to be stored somewhere, because Safari can restore them even between reboots.

3
  • 2
    I believe the concept of private tabs is that they are not remembered. This may be expected behavior. May 7, 2020 at 14:45
  • @SteveChambers I agree, it's the expected behavior of the "History > Restore All Windows from Last Session" menu command. But given that private tabs are always restored after a restart, an encrypted file that stores them (that I can recover from backup) should exist somewhere.
    – federicor
    May 7, 2020 at 14:58
  • I shut down properly yesterday with several open, private, windows. On opening this morning, I expected them to still be there as usual. They weren't. only the non-private ones. I agree, the addresses of private windows have to be stored somewhere. Unless Safari has changed and only keeps the addresses for the current session. MacBook Pro, Safari 13.1.2 Jul 30, 2020 at 8:56

1 Answer 1

0

Not exactly, but that info should be stored somewhere in these directories:

  • ~/Library/Containers/com.apple.Safari/Data/Library/Safari/
  • ~/Library/Containers/com.apple.Safari/Data/Library/Saved Application State/com.apple.Safari.savedState

I've replaced all files in these directories with older files I got from a Time Machine backup (while Safari was closed of course) and it helped me to get back lost private window on Safari 16.3 (18614.4.6.1.6).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .