Reputation: 265
I have an app that contains a simple UIWebView and I load a request with this UIWebView like this:
NSString * aURLString = [NSString stringWithString:@"mywebsite"];
NSURL * aURL = [NSURL URLWithString: aURLString];
NSURLRequest * aURLRequest = [NSURLRequest requestWithURL: aURL cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval: 10.0] ;
[mainWebView loadRequest:aURLRequest];
The problem is that when I monitor the server (apache) requests I see that my app asks the server for some resources (.js .css and some images) even if these resources are in the manifest.
It seems that some (not all) resources are not "cacheables" and I wonder why... I think that there is some cache limit or something like that. Any help?
Upvotes: 0
Views: 404
Reputation: 9156
The iOS cache system seems to have undocumented restrictions. You could build your own cache system, it's really not that difficult (1 day of work?) or rely on the cache of ASIHTTPRequest ( http://allseeing-i.com/ASIHTTPRequest/How-to-use#using_a_download_cache ).
Upvotes: 1