...this error handler also fires when the device is offline, which throws up the error dialog, when it really shouldn't.
This is actually the appropriate event for this situation, as applicationCache
is unable to obtain the manifest and therefore act on a possibly updated manifest. It would be nice to have another event for this situation, but right now there isn't one.
If you wanted to display useful information to the user about cache status: Check applicationCache.status
every time the error
event fires to see if there was an error on updating a previously-cached app (applicationCache.status===1
) or on initial caching (applicationCache.status===0
).