Created
May 17, 2012 18:43
-
-
Save rubdottocom/2720834 to your computer and use it in GitHub Desktop.
Objective-C: Clean Cache and Cookie from UIWebView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Set Cache | |
NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil]; | |
[NSURLCache setSharedURLCache:sharedCache]; | |
//Clear All Cookies | |
for(NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) { | |
[[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie]; | |
} |
rubdoftocom, ADD THIS TO viewDidLoad.
Thank you very much. Love from Russia!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this code to viewDidLoad