mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-18 08:35:10 +00:00
Update page when new version of application cache
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
define([], function() {
|
||||
var isAvailable = (typeof applicationCache !== "undefined");
|
||||
|
||||
var init = function() {
|
||||
if (!isAvailable) return;
|
||||
|
||||
window.applicationCache.addEventListener('updateready', function() {
|
||||
window.location.reload();
|
||||
}, false);
|
||||
};
|
||||
|
||||
return {
|
||||
init: init
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user