sw enhancement
This commit is contained in:
@@ -154,6 +154,8 @@
|
|||||||
}
|
}
|
||||||
console.log('Latest Service Worker Version: ' + serviceWorkerVersion);
|
console.log('Latest Service Worker Version: ' + serviceWorkerVersion);
|
||||||
console.log('Active Service Worker and Version: ' + reg.active.scriptURL);
|
console.log('Active Service Worker and Version: ' + reg.active.scriptURL);
|
||||||
|
const isMatch = reg.active.scriptURL.endsWith(serviceWorkerVersion)
|
||||||
|
console.log('On Latest Service Woprker: ' + isMatch);
|
||||||
if (!reg.active && (reg.installing || reg.waiting)) {
|
if (!reg.active && (reg.installing || reg.waiting)) {
|
||||||
// No active web worker and we have installed or are installing
|
// No active web worker and we have installed or are installing
|
||||||
// one for the first time. Simply wait for it to activate.
|
// one for the first time. Simply wait for it to activate.
|
||||||
|
|||||||
Reference in New Issue
Block a user