UIWebView 캐시 및 쿠키 지우기

546 단어 UIWebView
UIWebView 지우기 쿠키:
//  cookies
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [storage cookies]) 
{
    [storage deleteCookie:cookie];
}

UIWebView 캐시 지우기:
//  UIWebView   
[[NSURLCachesharedURLCache] removeAllCachedResponses];

아니면 아래 코드로.
NSURLCache * cache = [NSURLCache sharedURLCache];  
    [cache removeAllCachedResponses];  
    [cache setDiskCapacity:0];  
    [cache setMemoryCapacity:0];  

좋은 웹페이지 즐겨찾기