While AppCache checks the files to be cached, it lists it to the cache manifest file right? Is there anyway to check if this process is finished, including adding all the files to be cached in the cache manifest file?
Asked
Active
Viewed 672 times
1 Answers
0
There is no status available to check whether the download completed or not. But you can reload the browser to confirm the download using script.
<script>
// Check if a new cache is available on page load.
window.addEventListener('load', function (e) {
window.applicationCache.addEventListener('updateready', function (e) {
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
// Browser downloaded a new app cache.
if (confirm('A new version of this site is available. Load it?')) {
var appCache = window.applicationCache;
appCache.swapCache();
location.reload();
}
} else {
// Manifest didn't changed. Nothing new to server.
}
}, false);
}, false);
</script>

Golda
- 3,823
- 10
- 34
- 67