Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
/**
* Here is the simplified version. Courtesy of Mike Koss.
*
* See, http://labnote.beedesk.com/the-pitfalls-of-html5-applicationcache
*/
function handleAppCache() {
if (applicationCache == undefined) {
return;
}
if (applicationCache.status == applicationCache.UPDATEREADY) {
applicationCache.swapCache();
location.reload();
return;
}
applicationCache.addEventListener('updateready', handleAppCache, false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment