sw: Remove fetch handler from service worker
Some checks failed
Some checks failed
In current state, service worker overloads every "connection error" kind of reaction to a plaintext 200 saying "Offline.", which leads to terribly undebuggable situations as the browser decides to cache this as an image, and then someone's pfp is broken literally forever unless you Ctrl+Shift+R every time you reload frontend. This change removes the handler, because it is unclear how we even benefit from it being there.
This commit is contained in:
parent
5a9d4a3759
commit
026941ce77
1 changed files with 0 additions and 7 deletions
|
@ -23,13 +23,6 @@ self.addEventListener('activate', ev => {
|
|||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', ev => {
|
||||
ev.respondWith(
|
||||
fetch(ev.request)
|
||||
.catch(() => new Response(`Offline. Service Worker @${_VERSION_}`, { status: 200 }))
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('push', ev => {
|
||||
// クライアント取得
|
||||
ev.waitUntil(self.clients.matchAll({
|
||||
|
|
Loading…
Reference in a new issue