我已經通過各種解決方案來清除UIWebView中的本地圖像緩存,而我試圖在HTML中加載圖像它原子地顯示以前的圖像(我使用相同的名稱來替換圖像模板)。UIWebView中的本地HTML緩存策略
[[NSURLCache sharedURLCache] removeAllCachedResponses];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL:[NSURL fileURLWithPath:[[CustomFunctions getFilesPath] stringByAppendingPathComponent:obj]] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[webview1 loadRequest:request];
[webview1 reload];
這是我的代碼,可以任何人請建議我這樣做。提前致謝。對不起我的英語不好。
沒有任何效果。在html中仍然有相同的圖像。 – Gowtham
使您的webview n並再次初始化它。 – aBilal17