ios - How to cache websites and HTML5 works offline -
i have app uiwebview
, visited website developed in html5 work offline.
how can solve problem works if there no connection internet? possible manifest file?
another problem: want cache websites visited. works manifest too?
[self setrequestobj:[nsurlrequest requestwithurl:loadurl cachepolicy:nsurlrequestreturncachedataelseload timeoutinterval:60.0]];
i using code above if cut connection internet there seems no cached file.
ios urlloading system default caching depends on http response resources in page. check response headers , make sure there cache-control header appropriate values in dictate how default cache on ios has behave.
please refer below link understand more http caching. https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=en
also, refer similar question below: how cache resources loaded wkwebview?
Comments
Post a Comment