sw enhancement
This commit is contained in:
parent
c1e418c23b
commit
43bf13a7f0
1 changed files with 2 additions and 0 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue