-1

While appcache is downloading resources, if internet is lost at that time, i dont see appcache error event being called. It is stuck there with the status as 3

For the request that has failed, chrome logs it as net::ERR_INTERNET_DISCONNECTED error.

appCache.addEventListener('error', function(event){
    console.log("AppCache event fired : error");
    isAppCacheReady = true;
},false);

This is my error handler for appache.

Can someone please point out what am i missing here?

jk.
  • 13
  • 4

1 Answers1

0

You could do it this way. (javascript)

var cache = window.applicationCache;
cache.addEventListener('error', cacheFailed, false);

function cacheFailed() {
   console.log("AppCache event fired : error");
}
  • This error handler doesnt seem to fire when the internet goes down while downloading resources. That seems to the problem. – jk. Jul 06 '14 at 21:14