diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-03-11 12:46:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-11 12:46:07 +0100 |
| commit | 4b918084e413933cfc819bd1a1246c6a1ac13e31 (patch) | |
| tree | d01a1ef9c4818336fd82330855e09a74824a5fa7 /webAO/sw.js | |
| parent | 6dd1b296c2dd1d7462dd8514dff43db59ac8dd19 (diff) | |
| parent | 20424a76b00b303a94921a1b3c5fec6495471f0c (diff) | |
Merge pull request #101 from caleb-mabry/remove-unused-code
Magnum Opus Pt1
Diffstat (limited to 'webAO/sw.js')
| -rw-r--r-- | webAO/sw.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/webAO/sw.js b/webAO/sw.js deleted file mode 100644 index 09a2251..0000000 --- a/webAO/sw.js +++ /dev/null @@ -1,26 +0,0 @@ -const cacheName = 'webAO'; - -// Cache all the files to make a PWA -self.addEventListener('install', (e) => { - e.waitUntil( - caches.open(cacheName).then((cache) => - // Our application only has two files here index.html and manifest.json - // but you can add more such as style.css as your app grows - cache.addAll([ - './', - './index.html', - '../manifest.json', - ])), - ); -}); - -// Our service worker will intercept all fetch requests -// and check if we have cached the file -// if so it will serve the cached file -self.addEventListener('fetch', (event) => { - event.respondWith( - caches.open(cacheName) - .then((cache) => cache.match(event.request, { ignoreSearch: true })) - .then((response) => response || fetch(event.request)), - ); -}); |
