What does the following code mean? Especially the "if" section. Why does the alert
only fire sometimes?
window.applicationCache.addEventListener('updateready', function(e) {
if (window.applicationCache.status == window.applicationCache.UPDATEREADY)
window.location.reload();
alert('done');
}, false);
Any advice will be welcome.