0

I need some help...

I useNSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:@"www.xxx.com/xx.html"]]; [webView1 loadRequest:request]; The www.xxx.com/xx.html changed last day,but it also show the old content.How can I show the new content without upload a new App to AppStore. I find that the Default values for cache policy is : NSURLRequestUseProtocolCachePolicy.

How can I do reload this in server.

Thanks very much!

Ferry
  • 3
  • 6
  • try this : http://stackoverflow.com/questions/405151/is-it-possible-to-prevent-an-nsurlrequest-from-caching-data-or-remove-cached-dat – johny kumar Apr 28 '16 at 09:03
  • @johny kumar It also doesn't for me. The app is in AppStore now, I can't revise code anymore... too badly! – Ferry Apr 28 '16 at 09:25

1 Answers1

0

Please try this it will help you

[webView1 stringByEvaluatingJavaScriptFromString:@"document.body.innerHTML = \"\";"];

NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]];
[urlRequest setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];

[webView1 loadRequest:urlRequest];