ios - Local HTML Cache policy in UIWebView -
i have walked through various solution clear local image cache in uiwebview, while trying load image in html atomically displays previous image(i using same name replace image in template).
[[nsurlcache sharedurlcache] removeallcachedresponses]; nsmutableurlrequest *request = [[nsmutableurlrequest alloc]initwithurl:[nsurl fileurlwithpath:[[customfunctions getfilespath] stringbyappendingpathcomponent:obj]] cachepolicy:nsurlrequestreloadignoringlocalcachedata timeoutinterval:30.0]; [webview1 loadrequest:request]; [webview1 reload];
this code , can 1 please suggest me this. in advance. sorry english.
//to prevent internal caching of webpages in application
nsurlcache *sharedcache = [[nsurlcache alloc] initwithmemorycapacity:0 diskcapacity:0 diskpath:nil]; [nsurlcache setsharedurlcache:sharedcache]; //[sharedcache release]; sharedcache = nil;
try using this. clear url cache memory of application.
Comments
Post a Comment