码迷,mamicode.com
首页 > 移动开发 > 详细

iOS UIWebView清除缓存

时间:2014-10-27 17:32:57      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:blog   http   io   os   ar   for   sp   div   on   

UIWebView清除Cookie:

bubuko.com,布布扣
//清除cookies
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [storage cookies]) 
{
    [storage deleteCookie:cookie];
}
bubuko.com,布布扣

UIWebView清除缓存:

//清除UIWebView的缓存
[[NSURLCache sharedURLCache] removeAllCachedResponses];

//清除缓存(全)
NSURLCache * cache = [NSURLCache sharedURLCache];  
[cache removeAllCachedResponses];  
[cache setDiskCapacity:0];  
[cache setMemoryCapacity:0];

iOS UIWebView清除缓存

标签:blog   http   io   os   ar   for   sp   div   on   

原文地址:http://www.cnblogs.com/weiboyuan/p/4054572.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!