feat: add unresgiser old sw
This commit is contained in:
parent
8b71f6ab69
commit
9646fe6427
1 changed files with 13 additions and 0 deletions
|
@ -52,4 +52,17 @@ const baseURL = "https://ayo.ayco.io";
|
||||||
</script>
|
</script>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* unregister existing service workers
|
||||||
|
*/
|
||||||
|
navigator.serviceWorker.getRegistrations()
|
||||||
|
.then(
|
||||||
|
(registrations) => {
|
||||||
|
for(let registration of registrations) {
|
||||||
|
registration.unregister();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue