code: function checkCache() {
  // Check if new appcache is available, load it, and reload page.
  //if (window.applicationCache) {
  //  window.applicationCache.addEventListener('updateready', function(e) {
  //    if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
  //      window.applicationCache.swapCache();
  //      if (confirm('A new version of this site is available. Load it?')) {
  //        window.location.reload();
  //      }
  //    }
  //  }, false);
  //}
  
  	if(cache) {
  
  		cacheStatusValues[0] = 'uncached';
  		cacheStatusValues[1] = 'idle';
  		cacheStatusValues[2] = 'checking';
  		cacheStatusValues[3] = 'downloading';
  		cacheStatusValues[4] = 'updateready';
  		cacheStatusValues[5] = 'obsolete';
  
  		cache.addEventListener('cached', logEvent, false);
  		cache.addEventListener('checking', logEvent, false);
  		cache.addEventListener('downloading', logEvent, false);
  		cache.addEventListener('error', logEvent, false);
  		cache.addEventListener('noupdate', logEvent, false);
  		cache.addEventListener('obsolete', logEvent, false);
  		cache.addEventListener('progress', logEvent, false);
  		cache.addEventListener('updateready', logEvent, false);
  	}
  
  }
docs: window.applicationCache.addEventListener( 'updateready', function(){ window.applicationCache.swapCache(); fidj.InternalLog.log('swap cache has been called'); }, false ); setInterval(function(){cache.update()}, 10000);