I'm loading a train schedule URL into a UIWebView
. Refreshing is slow due to the page being bloated beyond belief with site-wide CSS, JS, image, and other resources that have their response headers set to
Cache-Control:no-cache, no-store, must-revalidate
Pragma:no-cache
but have
Last-Modified:Wed, 30 Apr 2014 02:48:09 GMT
Even with
NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024
diskCapacity:30 * 1024 * 1024
diskPath:nil];
[NSURLCache setSharedURLCache:URLCache];
those resources aren't being cached.
Question: I would like to know how to cache these resources in spite of their response headers, except for the train schedule HTML (which should not be cached). Optionally, I would like to NSlog
the resources being loaded. I'm using a standard UIWebView
and UIWebViewDelegate
methods.