I need to remove cache in wkwebview.I am using below code but no success.
[[NSURLCache sharedURLCache]removeCachedResponseForRequest:request];
[[NSURLCache sharedURLCache] removeAllCachedResponses];
[[NSURLCache sharedURLCache] setDiskCapacity:0];
[[NSURLCache sharedURLCache] setMemoryCapacity:0];
Try setting up the cache first when the application loads.
Once you have it properly configured, then when you need to purge the cache (for example in applicationDidReceiveMemoryWarning or when you close a UIWebView) just call:
Another thing to is you might want to try clearing the cookieStorage. I know this will reset sites you were logged into and such. Hope this helps.