清除WebView缓存

- (void)rightClick{
    NSHTTPCookie *cookie;
    
    NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
    
    for (cookie in [storage cookies])
        
    {
        
        [storage deleteCookie:cookie];
        
    }
    
    //    清除webView的缓存
    
    [[NSURLCache sharedURLCache] removeAllCachedResponses];
}

你可能感兴趣的:(清除WebView缓存)