Is it possible to cache resources loaded in an iPhone UIWebView?

前端 未结 6 862
时光取名叫无心
时光取名叫无心 2020-12-04 18:36

I have a simple app loading a site optimized for the iPhone in a UIWebView.

Problem is, caching does not seem to work:

[webView loadRequ         


        
6条回答
  •  粉色の甜心
    2020-12-04 19:06

    You can now try ASIWebPageRequest by All Seeing Interactive:

    ASIWebPageRequest is a new experimental addition to the ASIHTTPRequest family. It can be used to download a complete webpage, including external resources like images and stylesheets, in a single request. Once a web page is downloaded, the request will parse the content, look for external resources, download them, and insert them directly into the html source using Data URIS. You can then take the response and put it directly into a UIWebView / WebView on Mac.

    I can only advise everyone to use Ben Copsey's great library for all sorts of HTTP operations anyways.

    UPDATE: Ben has discontinued ASIHTTPRequest. I no longer suggest using it.

提交回复
热议问题