forked from binary-com/binary-static
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappcache_check.js
More file actions
21 lines (20 loc) · 869 Bytes
/
appcache_check.js
File metadata and controls
21 lines (20 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if (window.applicationCache) {
window.applicationCache.addEventListener('updateready', function(){
if (window.applicationCache.status === window.applicationCache.UPDATEREADY) {
try {
window.applicationCache.swapCache();
var appcache_reload_message = $('#appcache-reload-message');
appcache_reload_message.css('display', 'block');
appcache_reload_message.on('click', '#appcache-refresh-link', function () {
window.location.reload();
return false;
});
} catch (err) {}
}
}, false);
setInterval(function () {
try {
window.applicationCache.update();
} catch (err) {}
}, 5*60*1000);
}