We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d46741 commit ced6fc3Copy full SHA for ced6fc3
docs/.vitepress/public/service-worker.js
@@ -0,0 +1,14 @@
1
+// https://github.com/NekR/self-destroying-sw
2
+/* globals self */
3
+self.addEventListener('install', (e) => {
4
+ self.skipWaiting()
5
+})
6
+
7
+self.addEventListener('activate', (e) => {
8
+ self.registration
9
+ .unregister()
10
+ .then(() => self.clients.matchAll())
11
+ .then((clients) => {
12
+ for (const client of clients) client.navigate(client.url)
13
+ })
14
0 commit comments