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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -