LocalData/localdata-mobile-web — pull request #15 by prashtx (2013-02-21 22:13:43+00:00)
Title: Use the Application Cache

Cache the static content locally in the Application Cache.

We need to bundle jQuery into `main.js` to avoid timing issues with script loading, but since it will cached locally, overall load time should be much better.

This should also eliminate the occasional issue (likely a race condition) where jQuery Mobile didn't kick in.

The production manifest.appcache file gets generated by a grunt task, which adds a timestamp comment. The browser will check for a modified manifest if it's online, but it won't use the new manifest until the page has been reloaded. The next step is to listen for the appropriate events and reload the page from javascript if we've received a new manifest.

Since more caching will cause more suspicion that we're hitting a stale file, we can check the first line of `js/main.js`, which should include a version string and a timestamp.

/cc @hampelm