I'm into application cache related work in HTML5. I've added addCacheListeners() in body onload. This works fine with mobile safari and chrome, but NOT with android browser. when it comes to the android browser, error event is fired.
function addCacheListeners(){
var appCache=window.applicationCache;
if(appCache!== 'undefined'){
alert("defined");
appCache.addEventListener('checking', function(e){
}, false);
appCache.addEventListener('progress', function(e){
}, false);
appCache.addEventListener('updateready', function(e) {
alert("update is ready");
if (appCache.status == appCache.UPDATEREADY){
appCache.swapCache();
updateappInfo();
}
}, false);
appCache.addEventListener('noupdate', function(e){
updateappInfo();
}, false);
appCache.addEventListener('error', function(e){
alert("error" + e.message);
}, false);
appCache.addEventListener('cached', function(e){
alert("cached");
updateappInfo();
}, false);
}
if (appCache=== 'undefined'){alert("undefined");}
}
Any idea with regards to this? Thanks a bunch.