iOS 10.3 Safari cookies won't delete

Is anyone having any issues with cookies in 10.3 Safari? Cookies don't seem to delete when I try to remove them using all the delete methods. Additionally, when I block cookies, cookies still get stored.


May be cookies settings have changed and I need to change something. Does anyone know?

iPhone 6s

Posted on Mar 30, 2017 4:40 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 27, 2017 12:59 PM

I've had the same issue with being unable to delete a number of "0 Bytes" cookies on my iPad for a while, but recently an eBay.co.uk cookie of 508KB size began to exhibit the same behaviour - at which point I "snapped", enough is enough! I found a solution, however it's a little long-winded and requires a Mac:


  1. Connect the iOS device to a Mac and create a backup using iTunes
  2. Open the backup using an explorer/editor tool such as iBackupBot (I was a little dubious about using this at first, but it was signed by a registered developer and did not require installation nor did it ask for a password input at any stage, so pretty safe)
  3. Navigate to the folder "User App Files > com.apple.mobilesafari > Library > Webkit > Website Data"
  4. Delete all files and folders in the enclosed IndexedDB folder - this is where the 508KB of eBay data seemed to be
  5. Delete all files and folders in the enclosed WebSQL folder - where all the other "0 Bytes" cookies are stored. I was amazed there were even cookies in here which didn't show up in the Website Data view in Settings. Mine had a whole trove of cookies from argos.co.uk, ebay.co.uk, and uk.farnell.com amongst others.
  6. Restore the backup to your iOS device using iTunes


This was sucessful for me on both my iPad Pro and iPhone SE - both on iOS 10.3.3. I can't confirm if it will work for iOS 11 devices, but from what I've read many people have found the cookie problem to be fixed in 11.1.2.

202 replies

Apr 19, 2017 7:03 AM in response to DontFailMeApple

I have the same issue and have tried all the suggested resolutions short of full resets in part because if you have done a backup you will only reinstall the problem. I am in the UK and the problem sites are:

  • iPhone 6s = weather.com
  • iPad Mini 4 = argos.com & eBay.co.uk
  • MacBook Air = eBay.co.uk

Additionally further rogue websites show numbering anything from 2-30 depending on when you look and this after not having launched Safari!!!!

Apr 20, 2017 5:38 AM in response to OhMama

I hope that Apple is working on this bug as it is most frustrating and it can limit users ability to visit certain sites from Safari. You always can try another browser that works on iPhone, such as TOR.


The work around I've figured out (see earlier in thread regarding my experience with iPhone) is...

  • go to the page in Safari that corresponds to the cookie that will not clear; it must be the original domain, note that depending on your settings some sites may drop a cookie though you may not know that you visited their site, these are often tracking and analytics cookies, such as google-analytics.com
  • while Safari is open on that page, go into Settings | Safari | Advanced | Website Data and manually remove the offending cookie (swipe and delete) then click 'Remove All Website Data'; note that others have indicated that Safari must be closed so that the cookie doesn't reload, however, my experience was that the offending cookie wouldn't remove unless Safari was open, and that 'Remove All Website Data' closes pages so that can not reload cookies
  • some cookies will not remove using these steps, which appears to be part of the bug, my experience is that google.com will not remove using any method suggested by others in this thread, others have indicated in the thread that there are other sites that similarly will not remove

Apr 10, 2017 10:51 AM in response to DontFailMeApple

None of the methods suggested by Apple resolve this issue. The problem is that the cookies are saved in a locked state and will persist forever. I have used the SQLite command interpreter to inspect the backup files on my Mac and every cookie which cannot be deleted is stored in one of the tables. After using the "Erase All Content and Settings" on my iPad yesterday, followed by restoring from a backup, each and every one of the cookies was restored. An additional "bonus" behavior, once which results in apps occupying a specific row and column on the home screen being launched automatically after power up, was also restored; the bits responsible for this errant behavior are also being stored in the backup. Groovy.


My guess is that Apple has changed the behavior of persistent cookies without notifying developers; cookies that were once removable are now permanent.

Apr 11, 2017 12:48 AM in response to macprolar

I had the same problem with cookie databases (on OS X), but there is a way to remove them (use at your own risk, I assume you are a Unix/Linux user). Using a terminal window, cd to ~/Library/Safari/Databases. Remove what you do not want there.


It worked for me. This is certainly a new Safari bug, I have never seen Safari not be able to remove all cookies after a pass or two...

Apr 11, 2017 10:18 AM in response to axelcat

Thanks. I am reluctant to nuke anything there since I don't have any information related to the directory and database stucture used by Apple for these iPad and iPhone backups. I failed to specify earlier that the problems I am having are with iOS, not mac OS. The iOS 10.3.1 update caused this problem for me and my wife as well.


Having the skills is one thing, but reverse engineering Apple's backup structure for iOS devices is another. It is distributed among more than 100 subdirectories, each having one or more SQLite tables; the tables are so normalized that it is difficult to know which records to delete. I can't locate the top-level schema I would use to map everything.


Thanks

Apr 11, 2017 11:40 AM in response to macprolar

I saw this problem as well on my iPhone. Go into settings, then select Safari. Near the bottom I selected Clear History and Website Data. This then greyed out, but when I selected Advanced, then Website Data, I could still see data left by the original Clear. This is a bug (or a very interesting feature). I was able to click Edit however, and delete the individual databases.


Good Luck!

Apr 12, 2017 5:41 AM in response to axelcat

I have the same problem in iOS 10.3.1. Going into edit (Safari>Advanced>Website Settings>Edit) and manually deleting each does not solve the problem. Yes, they appear to go away after doing this. But, come back to to this Advanced>Website Settings page a second later and they are all still there.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iOS 10.3 Safari cookies won't delete

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