update.html was epmty for some reason?
This commit is contained in:
parent
ae55e9950e
commit
a13c19aba7
1 changed files with 44 additions and 0 deletions
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Updating...</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style>
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
padding: 2em;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Updating App…</h1>
|
||||
<p>Please wait while we refresh your version.</p>
|
||||
|
||||
<script>
|
||||
async function clean() {
|
||||
// Unregister all SWs
|
||||
if ('serviceWorker' in navigator) {
|
||||
const regs = await navigator.serviceWorker.getRegistrations();
|
||||
for (const reg of regs) {
|
||||
await reg.unregister();
|
||||
}
|
||||
}
|
||||
|
||||
// Delete all caches
|
||||
if ('caches' in window) {
|
||||
const keys = await caches.keys();
|
||||
for (const key of keys) {
|
||||
await caches.delete(key);
|
||||
}
|
||||
}
|
||||
|
||||
// Hard reload
|
||||
location.href = '/';
|
||||
}
|
||||
|
||||
clean();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue