Cookies won't delete on iOS

For the past three iOS versions for my iPhone 5s. I have been experiencing this issue constantly. I am now running iOS 11.0.2 and this issue still persists. What is happening is that when I finish a lengthy Safari mobile web browsing session on iOS 11.0.2 and then then head to Safari settings under the main settings menu and attempt to delete my user data and cookies from my device. Some user data and cookies will remain even after deletion, no matter how many times the deletion process is executed. I have found that the only true way to fix this oddly enough, is to perform a full system settings reset which will alleviate the problem, but only temporarily until the system collects another of these apparent Evercookies from a website. The issue has been driving me insane since I have been dealing with it for three versions of iOS now since iOS 9 at least! And yes, a full system reset doesn't fix the issue either I have tried twice in the past to no avail. So to any high level developers out there reading this !!! I beg you to forward this to Tim Cook himself so he can tell the head developers at Apple cause somewheres along the line, the code to fully delete cookies got corrupted in the frequent iOS updates or damaged by the phone's filesystem!!!.


!!! FIX THIS NOW APPLE I'M TIRED OF DEALING WITH THIS!!!

iPhone 5s, iOS 11.0.2, AT&T Prepaid

Posted on Oct 8, 2017 6:16 PM

Reply
15 replies

Oct 16, 2017 11:40 PM in response to Needs Help 1958

I have found a solution that works. I tested on both ios 11.1 beta 3 on my iphone 8 and 11.0.3 on my ipad.


I have this problem since ios 10 on iphone 5s. After I bought an iphone 8 recently and used the backup from the iphone 5s to restore, the "persistent" cookies migrated to the new device. I also bought an iPad Pro and used the backup from the phone to set it up, the "persistent" cookies migrated to the ipad as well.


All the operations and software are under windows. What you need to do is:


Step 1: Use iTunes or a third party software to make a backup of your device.

Step 2: Use a third party software (I used iMazing because it is the one I found that can edit the backup. This is not supposed to be an advertisement.) to edit the backup. To do this you first need to select the backup you made and click the edit button. Then you need to remove all the files in the editable backup under "File System/Apps/AppDomain-com.apple.mobilesafari/Library/WebKit/WebsiteData/WebSQL/ ". You will be able to see all the cookies that you can not delete at this location. I this the absolute path in the actual file system is /var/mobile/Application/com.apple.mobilesafari/Library/WebKit/WebsiteData/WebSQ L/.

Step 3: Usw iTunes or a third party software to restore the backup.


Note: The backup should not be encrypted.


The solution is quite technical, and I hope apple devs can fix this problem soon.

Oct 19, 2017 11:04 PM in response to HenryBlackW

With the method you outlined for iMazing or another third party software, you suggested deleting all the files in the ".../WebSQL/" folder. Can you just delete the problematic cookie files or do you have to delete all the cookie files? I can see some cookie files (in iMazing) that don't show up in the cookie list when you go to Settings > Safari > Advanced > Website Data >

Is it possible that maybe these other cookie files are associated with the problematic cookies?


Oct 22, 2017 9:53 PM in response to JEM118

Well, the point was whether deleting the problem cookies with the suggested method would work if I only deleted the problem cookies and if the other cookies have any bearing on the problem cookies.


I deleted one problem cookie using the suggested method but it still showed up in Safari's cookie list, but not in the WebSQL sub-directory.


So, I tried again, this time deleting all the cookies using the same method. One problem cookie is finally gone, but the other problem cookie is still there. So the method only seems to work on some cookies.


Apple really should fix this stupid problem. Users shouldn't have to go to so much trouble just to delete cookies.

Oct 22, 2017 10:26 PM in response to Toucan_touche

Agreed, Apple should step up.


I loaded the beta 10.3 assuming Apple would fix it there soon, they didn’t. I was sure ios 11 would clean it up, it didn’t.


The fix would appear to be simple, but maybe developers like those in the comic strip Dilbert are involved.


Deleting the cookies from WebSQL appears to have solved the problem for me.


Good luck!

Oct 23, 2017 12:31 AM in response to Toucan_touche

From my understanding, you can delete all the files under the WebsiteData folder (that is the folder one layer above WebSQL). It seems that the three subfolder under WebsiteData (WebSQL, IndexDB, and MediaKeys) represent three different types of website data supported by the browser. I would recommend keep the three sub-folders as they are and just delete the files/folders in the three folders. Also it looks like that the entire folder "File System/Apps/AppDomain-com.apple.mobilesafari/Library/" stores the data (not the app) of the browser, I guess if you delete the content (keep the folder structure and delete the files, except the folders with names that looks like website addresses) under the Library, it would be like resetting the browser. I have not tried the "nuclear" option, but if my previous method worked partially on your phone, you can try to "nuke" the browser... Please make sure you keep a copy of the original backup...

Oct 23, 2017 8:39 PM in response to HenryBlackW

After I deleted the files in WebSQL and the problem cookie remained I thought it hadn't worked because in 'Settings>Safari>Advanced>Website Data' when I chose 'Remove All Website Data' and returned to 'Website Data' it was still there, but later I tried a different approach. In 'Website Data' I chose Edit clicked on the minus symbol, then the red delete and assumed it would still return later on as usual. But then I opened Safari and my favourites were greyed out. After a few seconds they had reset. I returned to Settings>Safari>Advanced>Website Data and lo and behold the remaining problem cookie had finally gone.


So now it appears that deleting the files in WebSQL is the method that works. I used iBackupBot as it allowed me to delete the files in the trial period whereas iMazing requires purchase. If anyone else tries this method, definitely make a copy of the backup before deleting those files.


I should mention that after deleting the problem cookie and starting up Safari, the folders and files relating to the cookie in 'System/Apps/AppDomain-com.apple.mobilesafari/Library/WebKit/WebsiteData/Indexe dDB' disappeared, so I didn't have to manually delete them.


(NOTE: my Safari is now set to block all cookies. I use Chrome for any sites where cookies are required and it will stay that way until Apple fixes their cookie problem.)

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.

Cookies won't delete on iOS

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