Bug(代码)

网页清除cookies

2016-12-01  本文已影响5人  IceWall_Rin

if ([userInfo.thirdAPPName isEqualToString:@"Saavn"]) {

NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];

for (id cookies in [storage cookies]) {

[storage deleteCookie:cookies];

}

}

[[NSURLCache sharedURLCache] removeAllCachedResponses];

NSURLCache * cache = [NSURLCache sharedURLCache];

[cache removeAllCachedResponses];

[cache setDiskCapacity:0];

[cache setMemoryCapacity:0];

文/远0(简书作者)

原文链接:http://www.jianshu.com/p/8b21b5dcbdaa

著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。

上一篇 下一篇

猜你喜欢

热点阅读