I want to use a webview to loadUrl(.html file)
here is my code:
NSURL *url =[NSURL URLWithString:self.requestUrlStr];
NSMutableURLRequest *request =[NSMutableURLRequest requestWithURL:url];
request.cachePolicy = self.webCachePoliocy;
[request setTimeoutInterval:15];
[self.webView loadRequest:request];my purpose:
If the the .html file is cached by http cache policy, I don't want it to load the file from cache.
but:
But when the file has different fragment(for log, it's useful, such as #spm=1.1.1.1), the .html file won't load from cache, just like load a different file.
It's not fulfill the http cache policy, url fragment(or hash) shoudn't effect the file cache.
Did I use it the wrong way ? If not, how to fix it, please.