首页 > Web开发 > 详细

清除UIWebView缓存

时间:2015-10-06 15:16:26      阅读:263      评论:0      收藏:0      [点我收藏+]
//清除cookies
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [storage cookies]) 
{
    [storage deleteCookie:cookie];
}
//退出登录实现


//清除UIWebView的缓存
[[NSURLCachesharedURLCache] removeAllCachedResponses];

NSURLCache * cache = [NSURLCache sharedURLCache];  

 [cache removeAllCachedResponses];  

[cache setDiskCapacity:0];  

[cache setMemoryCapacity:0];  

清除UIWebView缓存

原文:http://www.cnblogs.com/z-j-w/p/4857081.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!