本文共 551 字,大约阅读时间需要 1 分钟。
UIWebView缓存清理的方式
https://stackoverflow.com/questions/2523435/how-to-clear-uiwebview-cache
if (lastReq){ [[NSURLCache sharedURLCache] removeCachedResponseForRequest:lastReq]; [[NSURLCache sharedURLCache] removeAllCachedResponses];}lastReq=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:localUrl] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10000];[lastReq setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];[self.mainWebView loadRequest:lastReq];
转载地址:http://jlxvb.baihongyu.com/