Skip to content

Commit 42e51f1

Browse files
committed
Remove no-op fetch event handler from service worker
- Removed the fetch event listener that was just passing through to browser default behavior - This eliminates the 'no-op fetch handler may bring overhead during navigation' warning - Service worker now only contains essential handlers: install, activate, push, and notificationclick - Improves performance by removing unnecessary event listener overhead
1 parent ac42c42 commit 42e51f1

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

public/sw.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ self.addEventListener("activate", (event) => {
1313
event.waitUntil(self.clients.claim());
1414
});
1515

16-
// Basic fetch handler (no-op passthrough)
17-
self.addEventListener("fetch", (event) => {
18-
// Let the browser handle requests by default
19-
});
20-
2116
// Push handler: show notification if payload provided
2217
self.addEventListener("push", (event) => {
2318
let data = {};

0 commit comments

Comments
 (0)