ios webview清除缓存Cookie
UIWebView清除Cookie:
//清除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];
本文详细介绍了如何使用 Objective-C 对 iOS WebView 进行缓存与 Cookie 的清除操作,包括删除 cookies 和缓存响应的方法。

2万+

被折叠的 条评论
为什么被折叠?



