把这几行代码进来就行了,具体效果能不能达到需求你也不知道,没法测。
[[NSURLCache sharedURLCache] removeAllCachedResponses];
for (NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) {
[[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie];
}
有博文也是这么写的 http://blog.csdn.net/zhaoweixing1989/article/details/13021571
时间: 2024-10-06 14:58:08