I've been developing a web app that uses the offline cache, partly as a way to reduce the number of calls made to the server while in use.
I was hoping to have the login page load and cache all the resources such that all pages behind the login would not have to.
What I'm noticing from the server logs is that although all the resources (images, stylesheets, javascript files) in the manifest are requested when the login page loads, after the user has logged in, and redirected to, say, /workspace/
, Safari (both desktop and mobile) seems to request the the stylesheets and javascript files listed in /workspace/
again, resulting in a HTTP 304
from the server.
While the load in serving a 304
is minimal, I'd like like to know if there was a way to avoid those. I tested the same code in Chrome (dev channel), and Chrome only requests the cache manifest again after login, and that's it.
Would appreciate any thoughts! Thanks in advance!
I have noticed in my offline app that the host page (the one with the manifest tag in it) must be in the manifest file as well (only in iPhone iOS since 4.3), this to support startup in airline / offline mode. Perhaps this has something to do with your problem as well.
I had a problem with the offline mode in iOS 4.3 (read this for more insight in the 4.3 issue http://www.theregister.co.uk/2011/03/15/apple_ios_throttles_web_apps_on_home_screen/) however when I updated to 4.3.2 it worked again.