add clear caching
This commit is contained in:
@ -158,6 +158,18 @@
|
||||
alert("not completed");
|
||||
}
|
||||
}
|
||||
async function deleteAllCaches() {
|
||||
try {
|
||||
const cacheNames = await caches.keys();
|
||||
|
||||
await Promise.all(
|
||||
cacheNames.map(cacheName => {
|
||||
console.log(`Deleting cache: ${cacheName}`);
|
||||
return caches.delete(cacheName);
|
||||
})
|
||||
);
|
||||
} catch {}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@ -208,10 +220,11 @@
|
||||
</section>
|
||||
<section>
|
||||
<h2>manage data</h2>
|
||||
<p>not implemented</p>
|
||||
<p>download & upload currently unfinished, use the cloud backups</p>
|
||||
<button id="downloadData">download</button>
|
||||
<button id="uploadData">upload</button>
|
||||
<button onclick="wipeData()">wipe (erases all game data)</button>
|
||||
<button onclick="deleteAllCaches()">wipe all cache</button>
|
||||
</section>
|
||||
</sections>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user