lundi 20 avril 2015

How to update Cache using ApplicationCache HTML5

I want to make my web applications accessible offline, I'm using application cache to do that.

the main issue i'm facing is how to update the cache every time the user is online, I was reading that the only solution to force the browser to update the cache is to modify the manifest file (correct me please if I'm wrong).

So how I would be able to update the cache without editing the manifest file.

var appCache = window.applicationCache;
appCache.update();
if (appCache.status == window.applicationCache.UPDATEREADY) {
appCache.swapCache();
}

this code requires the manifest file to be changed, how could that be possible without modifying the manifest file ?

Aucun commentaire:

Enregistrer un commentaire