wycats's jquery-offline


wycats’s jquery-offline at master – GitHub

The jQuery offline plugin provides an easy mechanism for retrieving JSON data from a remote server, and then caching it. Subsequent requests for the same URL will retrieve the data from the cache, rather than the remote server.

If the user is online, the plugin will transparently request new content from the remote server, firing the callback again if the content has changed. If the user is offline, the plugin will request the data from the remote server for the most recent request when the user comes back online.

jQuery Offline uses the HTML5 localStorage API for persistence. You can use the same API for browsers that do not support localStorage, jQuery Offline will simply fall back to making a request to the server each time. As a result jQuery.retrieveJSON is a portable way to make a request for JSON that should be cached if possible.

Related Posts