苹果ios开发者

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
//清除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];  

posted on 2015-10-06 14:13  苹果ios开发者  阅读(548)  评论(0编辑  收藏  举报