Sunday, January 5, 2014

UIWebView cache

I now want to investigate UIWebView cache (URLCache), time is very tight.
Has anyone done something relevant aspects, first tell me some suggestions or some attention points.
Reply:
 [webView loadRequest: [NSURLRequest requestWithURL: [NSURL URLWithString: url] 
cachePolicy: NSURLRequestUseProtocolCachePolicy
timeoutInterval: 60.0]];


You mean like NSURLRequestUseProtocolCachePolicy?
NSURLRequestCachePolicy defines constants that are used to specify interaction with the cached responses.


Constant
Description

NSURLRequestUseProtocolCachePolicy
Specifies that the caching logic defined in the protocol implementation, if any, is used for a particular URL load request. This is the default policy for URL load requests.

NSURLRequestReloadIgnoringCacheData
Specifies that the data for the URL load should be loaded from the originating source. No existing cache data should be used to satisfy a URL load request.

NSURLRequestReturnCacheDataElseLoad
Specifies that the existing cached data should be used to satisfy the request, regardless of its age or expiration date. If there is no existing data in the cache corresponding the request, the data is loaded from the originating source.

NSURLRequestReturnCacheDataDontLoad
Specifies that the existing cache data should be used to satisfy a request, regardless of its age or expiration date. If there is no existing data in the cache corresponding to a URL load request, no attempt is made to load the data from the originating source , and the load is considered to have failed. This constant specifies a behavior that is similar to an "offline" mode.


Reply:
http://yuiblog.com/blog/2008/02/06/iphone- cacheability /
Reply:
Can I UIWebView are assigned to each separate cache folder? ? ?
Reply:
reference to the third floor tyoutk13520 reply:
Can I UIWebView are assigned to each separate cache folder? ? ?

That I'm not sure
Sorry, can not help on your
Reply:
Thank you for your answer.
Ignore the problem first.

No comments:

Post a Comment