Teaches the applicationCache douchebag some manners!
As we all know, the Application Cache is a Douchebag. It's time to teach it some manners – The appCache Nanny for Rescue!
No more manifest attributes on your HTML files. Weathere you want to cache your assets offline or not, when to start ... you are in control™
appCacheNanny
checks automatically for new updates and applies them for you, so they become visible
next time you reload the app. It provides a simple JavaScript API, too
// start to check for updates every 30s appCacheNanny.start() // optionally, pass intervals in ms appCacheNanny.start({checkInterval: 10000}) // you can also check for updates at any time appCacheNanny.check() // The appCache nanny tells you if there is a new update available appCacheNanny.hasUpdate() // She tells you about all relevant applicationCache events appCacheNanny.on('error', handleError) appCacheNanny.on('obsolete', handleObsolete) appCacheNanny.on('noupdate', handleNoupdate) appCacheNanny.on('downloading', handleDownloading) appCacheNanny.on('progress', handleProgress) appCacheNanny.on('cached', handleCached) appCacheNanny.on('updateready', handleUpdateready) // plus some extra ones appCacheNanny.on('init:downloading', handleInitDownloading); appCacheNanny.on('init:progress', handleInitProgress); appCacheNanny.on('init:cached', handleInitCached); appCacheNanny.on('start', handleStart); appCacheNanny.on('stop', handleStop);
appCacheNanny
is extracted from and battle-tested in minutes.io.
Get more instructions and file issues on GitHub.