Closed ChrisRus closed 11 years ago
Since a cache manifest file may have been updated before a script attaches event listeners to test for updates, scripts should always test window.applicationCache.status.
function onUpdateReady() { alert('found new version!'); } window.applicationCache.addEventListener('updateready', onUpdateReady); if(window.applicationCache.status === window.applicationCache.UPDATEREADY) { onUpdateReady(); } To manually start testing for a new manifest file, you can use window.applicationCache.update().
Fixed this over the weekend.
I notice that on an extremely fast machine with an extremely fast Internet connection that it's possible to load the Schema application and get stuck at phase 2 bootstrap waiting on app cache events.
This definitely feels like a race condition. Likely there's a way to query the app cache for its current status and explicitly actuate the function in the bootstrap chain if the app cache has already reached a terminal state.