Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Reset Safari's Private Browsing Data

Without private browsing, if I visit a site such as reddit, login, and check the "remember me" box, Safari will effectively remember me until I do a Reset Safari with everything checked (this is the expected behavior). However, if I do exactly the same thing with Private Browsing enabled, Reset Safari stops working as expected for the data saved during a Private Browsing session. Worse, the data Safari saves during the Private Browsing session stays permanently, so quitting and restarting Safari does not fix the problem, as once I re-enable Private Browsing, reddit will remember me again.


I've tried everything I could to reset my Private Browsing data but apparently it keeps coming back. I have plugins and Java disabled, so it can't be Flash; I've even gone as far as to remove the ~/Library/Caches/com.apple.Safari and ~/Library/Safari directories entirely to no avail, reddit continues to remember me in Private Browsing no matter what I do and only when Private Browsing is enabled (which is kind of ironic).


Obviously I'm not concerned about reddit itself, but if reddit, which has no ill intent, can remember me, then I wonder how much data is being saved without my knowledge that I can't remove during a private browsing session.

MacBook Pro (15-inch Late 2011), OS X Mountain Lion (10.8.1)

Posted on Sep 15, 2012 9:03 AM

Reply
11 replies

Sep 15, 2012 10:57 AM in response to Vaelian

Perhaps I've not made myself clear. Sites setting cookies during Private Browsing is not the issue, the issue is that I can not find a way to remove data stored locally during a Private Brwosing session. Every time I visit reddit with Private Browsing enabled, it remembers me no matter how many times I reset Safari and completely wipe its directories from my home directory. I've even searched for the string 'reddit' in my ~/Library and didn't find anything of relevant.

Sep 15, 2012 3:40 PM in response to Klaus1

HRML5 supports key/value and relational local storage, which reddit uses. Safari not deleting this data when I do a reset is definitely a bug, but that's not my issue, my issue is that I don't know where that data is stored in order to delete it manually, because deleting ~/Library/Safari and ~/Library/Caches/com.apple.Safari does not delete the locally stored data that reddit (and god knows who else) has stored in my computer.

Sep 15, 2012 4:56 PM in response to Klaus1

jps@aegis: ~/Library/Safari $ defaults read "`pwd`"/History

2012-09-16 00:49:52.014 defaults[18534:707]

Domain /Users/jps/Library/Safari/History does not exist

jps@aegis: ~/Library/Safari $ ls -l History.plist

-rw-r--r--@ 1 jps staff 0 Sep 16 00:47 History.plist


As you can see, the file is empty, and I'm still logged in to reddit. Not that this matters, though, because as I mentioned earlier, have completely wiped these directories (~/Library/Safari and ~/Library/Caches/com.apple.Safari) to no avail, so this file was wiped, too. If the data is stored anywhere, it's got to be outside these two directories, possibly in a core data (sqlite database) file somewhere else...

Dec 11, 2012 4:37 AM in response to Vaelian

Vaelian, I face this bug, too. Did you find any solution or reported the bug, already?


With Wireshark, I was able to verify that Apple simply sends the Cookie. Nobody (Flash, Java or HTML itself) did request the Cookie. The cache and cookies for private-browsing are kept as long as I am logged in. If you turn off private-browsing, Apple uses Library/Cookies/Cookies.binarycookies and therefore, the cookie is not present. However, if you turn on private-browsing again, the Cookie magically appears! I checked my whole disk and could not find the private-brwosing cookie-store. I guess, it is stored somewhere in RAM.


My solution:
I logged-out via Apple menu. Alternatively, I restart the whole computer. Then, all cached data and the cookies of my private-browsing mode got deleted.


Side effects:
This private-browsing cookie-store gets corrupted after some time and I experienced the wildest errors on webpages. Again, logging out and logging in again, solved it.

Jun 27, 2013 12:11 PM in response to Vaelian

Go into your preferences in Safari. Go to the Privacy tab. Click "Remove All Website Data...". If you click "Details..." before you do this, you can see what is storing data in localStorage.


Keep in mind that while in Private Browsing mode in Safari, Web sites cannot set items in localStorage; if a Web site relies on the use of localStorage, it may not work correctly in Safari, while in Privat Browsing mode.

Reset Safari's Private Browsing Data

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.