webview清除缓存

把这几行代码进来就行了,具体效果能不能达到需求你也不知道,没法测。


[[NSURLCache sharedURLCache] removeAllCachedResponses];

    for (NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) {

        [[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie];

    }


有博文也是这么写的 http://blog.csdn.net/zhaoweixing1989/article/details/13021571


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