You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Cookies set to "Never" but Safari now accepts all cookies anyway

In looking closely at cookies accepted "only from sites I visit" I noticed that it actually includes a lot of third-party cookies, so I keep Preferences set to Never unless I'm accessing a site that must accept them (for example, New York Times). However, in the last few days something has changed (I don't know what that is), and now all cookies are accepted even though I have Preferences set to Never. Seems like this change coincides with the latest Safari update from a couple of days back. Is there anything I can do to stop it accepting any and every cookie? Thanks.

iMac, Mac OS X (10.6.7)

Posted on Jun 25, 2011 5:36 AM

Reply
171 replies

Feb 18, 2012 12:46 PM in response to nicoladie

Thanks nicoladie for the clear explanation.


> Until Apple had fixed these 2 bugs, the workaround is:

> 1. Close all windows before you quit Safari.

> 2. Then empty cache befoer quitting Safari.

> 3. Relaunch Safari, and empty cache immediately.

> 4. Relaunach Safari one more time.

>

> This will clear all you unwanted cookies and unwanted caches.


This did not work for me. Perhaps Apple has 3 bugs, not the 2 you describe. But no matter how many times I told Safari to empty the cache and then quit, the cache always came back, along with the hundreds of cookies in it, mostly from advertising and tracking companies I want nothing to do with.


This DID work: in Terminal,


cd /Users/{me}/Library/Caches/com.apple.Safari

cp Cache.db sav-Cache.db

cp /dev/null Cache.db

chmod 0 Cache.db


Safari's cache is now a file of 0 size, not writeable by anybody.

Feb 19, 2012 12:42 PM in response to Keith Dawson

That is a brute-force way to lock the cache so Safari can't write to it. Someday, when Safari is fixed, you have to revert it to be writeable to improve the browsing experience with cache enabled.


Cache is not a bad thing to have. Without cache, all your webpages have to be reload everytime. It slows things down and takes up too much network traffic unnecessarily. The reason why you have big cache files is because it saves you from reloading all the pages when you revisit them, if nothing in those webpages had changed in the meantime.


Usually cache should not be the problem. It's only when Apple trying to use cache to save the rejected cookies that should never had been accepted in the first place that is causing the problem. This is a huge privacy issue that Safari had broken, by accepting rejected cookies and saving them when they should never had been saved.

Feb 24, 2012 1:33 PM in response to Keith Dawson

I actually did not make any difference if you lock Caches.db file. Safari still accepts all cookies regardless.


You can prove this easily. After you lock Caches.db files and make it to zero byte, block all cookies in Safari preferences settings, and if you didn't close all the windows before you quit, next time you relaunch Safari with those unwanted cookies will reappear again.


How do they reappear? Just go back to Privacy settings, it shows no extra cookies. So far so good.


But now, just click "Details" button of the "Cookies and other website data", all those unwanted cookies from the previous session magically will reappear.


This proves that when Lion preserves the previous state of Safari upon relaunch, it re-populates all those unwanted cookies, even though it did not write it to cache, it saved those rejected cookies in the "saved states".


This shows that Lion actually keeps everything, including rejected cookies in saved state, independent of the cache stores. So it may require to block Safari from saving its state to completely eliminate any trace of the rejected cookies that should never be accepted in the first place.

Feb 27, 2012 7:52 AM in response to Silkroad

Surprising discovery:


Start up your Mac and invoke Safari, then go to Preferences:Privacy:Details and remove all cookies and other data that you don't want to keep (in my case, I keep NYT and a couple of others), then click Done ...


but *don't close the Preferences:Privacy pop-up*


You can continue to surf the Web while it's open. Safari won't accept anything while that pop-up is open.


Doesn't matter if you've checked Block Pop-up Windows in the Safari menu (I leave it checked)


As soon as you close that pop-up, Safari goes back to accepting any and everything, as usual. As long as the pop-up is there, it doesn't.


Next time you start up, you'll find the same set of cookies and data that apparently are accepted during startup. Delete them, but (as before) don't close Preference:Privacy pop-up

Feb 27, 2012 8:16 AM in response to richardfromgreenvale

Surprising discovery:


Start up your Mac and invoke Safari, then go to Preferences:Privacy:Details and remove all cookies and other data that you don't want to keep (in my case, I keep NYT and a couple of others), then click Done ...


but *don't close the Preferences:Privacy pop-up*


You can continue to surf the Web while it's open. Safari won't accept anything while that pop-up is open.


Doesn't matter if you've checked Block Pop-up Windows in the Safari menu (I leave it checked)


As soon as you close that pop-up, Safari goes back to accepting any and everything, as usual. As long as the pop-up is there, it doesn't.


Next time you start up, you'll find the same set of cookies and data that apparently are accepted during startup. Delete them, but (as before) don't close Preference:Privacy pop-up

Feb 27, 2012 8:18 AM in response to Silkroad

This does not work for me.


I did as you suggest, leaving the Privacy Preference panel open. When I looked a few minutes later, dozens of new objects had accumulated in it: cookies, cache, plug-ins, and local storage, many from 3rd parties. (The cache was puzzling to me, as I have disabled it as described in an earlier post.)


Safari 5.1.3 (7534.53.10) on Lion 10.7.3.

Feb 27, 2012 8:23 AM in response to Keith Dawson

That's very odd. I've left Preferences:Privacy pop-up open for a couple of hours this morning, and haven't accepted anything (I've been checking every few minutes, and testing different scenarios).


Maybe it's related to individual Mac setups? Maybe it's a more fundamental issue than any of us realize? Maybe that explains why they haven't fixed it?


Perhaps my work-around works for some of us, just not everybody?

Feb 27, 2012 10:34 PM in response to Silkroad

The reason why you don't see those unwanted cookies show up is because Safari does not update them in the preferences privacy tab to display them to you.


But as soon as you quit Safari and relaunch them, they will all reappear instantly.


The trick is to empty cache immediately after the relaunch (and close all opened windows immediately).

Then relaunch Safari the second time or the third time, these unwanted cookies will disappear forever.


(That is, whether Preferences tell you if the cookies are there or not is irrelevant, they are saved internally. It is just a matter of when Safari will display them to you in Preferences. Safari hide it from you in the current session. But once you close the session, and relaunch it, those cookies will be re-populated in the next browsing session.)

Feb 27, 2012 10:57 PM in response to nicoladie

The problem is Safari lied about rejecting the cookies. It certainly tells the website that you rejected the cookies (which is true, unless you enabled cookies), but it secretly saved all rejected cookies.


Now, even in the same browsing session with the Privacy pop-up still open, if you switch from reject to accept cookies, all those previously rejected cookies will be populated in the "Details" button, even when the pop-up is still opened. It does not accept cookies from the moment you turned it on, it actually accepts all cookies before you turned it on, except that it didn't show you until you switch to accept cookie. That is when their lies came out in the open.

Feb 28, 2012 7:03 AM in response to Silkroad

Nicoladie,


You're probably correct, Safari probably did save them even though they didn't appear when I checked to see what was there.


*But* there were no saved cookies through the end of my computing day yesterday, nor were there any extras this morning when I started up Safari (just the same batch that are evidently part of the startup regime).


Thus, I'll continue to leave open the Preferences:Privacy pop-up. It works for me -- no unwanted cookies saved.

Feb 28, 2012 7:43 AM in response to Silkroad

I've tries several ways, but the controls are just not there to have true control.

Changing the setting to 3rd party is the only way I can get back into banking and here.


I may go look for 3rd party cookie control where precise controls are dialed in.

One other related, is Google Mail.

Just discovered settings there today to allow tracking or delete & pause it.

Fellow responded just like Apples cookies, you may think they were deleted,,,,

Cookies set to "Never" but Safari now accepts all cookies anyway

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