Fetching/Cashing Data From UIWebView
I was wondering if there is anyway to开发者_运维技巧 get what is being displayed in UIWebView. e.g; you have opened bbc.co.uk in UIWebView and you wanted to save all the content of that page, Is there anyway to do that?
I think that Webkit on iPhone uses the standard [NSURLCache sharedURLCache]
for caching. If that is the case, you can implement your own cache or query the cache for existing items. Try:
[[NSURLCache sharedURLCache] cachedResponseForRequest:myRequest];
Implementing your own cache is a more reliable solution, because the system cache may choose not to cache anything.
精彩评论