ios - UIWebView ignoring disk cache? -
in hybrid app name web resource instance main.css?{timestamp-file-was-modified}
, give them year-long max-age cache header clients should keep more or less forever.
what seems happen in ios app is, however, uiwebview
honors cache header during app's lifetime, i.e. when load new page includes main.css?{same-timestamp}
won't try revalidate knows has right file in cache. but, upon fresh launch of app (after being killed or device switched off) uiwebview
fetches resources again, ignoring cache. i've run through charles proxy verify case.
i've looked inside sqlite cache.db , see main.css?{same-timestamp}
there, still uiwebview
won't load cache, causing initial page load slower be.
i've tried on iphone ios 8.4 , ipad ios 8.2. same result.
any ideas?
if control cache, can register custom nsurlprotocol subclass in delegate , using - (void)startloading
can load local storage.
Comments
Post a Comment