开发者

Fetching/Cashing Data From UIWebView

开发者 https://www.devze.com 2022-12-31 14:46 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消