I am trying to create a webview (as an exercise) that does not track or save the browsing history locally. I made it so that when the webview is closed, it calls the following
[[NSURLSession sharedSession]resetWithCompletionHandler:^{}];
but I find that things like google search history are saved both between sessions. I also tried to clear the cookie separately through
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; for (NSHTTPCookie *cookie in [storage cookies]) { [storage deleteCookie:cookie]; } [[NSUserDefaults standardUserDefaults] synchronize];
still to no avail. Google searches still appear when creating a new web view.
Does anyone know how to remove the id used by Google to match my search history to me? I am worried about something like a package identifier, which is probably a little harder not to read.
Any ideas are welcome. Yours faithfully,
Luke
source share