[w3c/ServiceWorker] Skip service worker no-op fetch handler (Issue #1671)

Hi Service Worker WG!

Let me ask your feedback on our proposal:

Some sites have a no-op (no operation) fetch handler (e.g. `onfetch = () => {}`). Since having the fetch handler was one of the requirements to be [a progressive web app (PWA)](https://developer.mozilla.org/docs/Web/Progressive_web_apps), we assume that they did that to make their site recognized as PWA. However, it only brings overheads to start a service worker and execute a no-op handler without bringing any feature benefits like caching or offline capabilities because the code does nothing. To make the navigation to such pages faster, we would like to omit the service worker start and the handler execution from the navigation critical path if a user agent identifies that the service worker fetch handler is no-op.

This is mostly a behind-the-scenes performance improvement. However, it can subtly change the behavior in edge cases, such as dynamically-updated fetch handlers.

- [Explainer](https://github.com/yoshisatoyanagisawa/service-worker-skip-no-op-fetch-handler/blob/main/README.md)

Currently, the explainer is in my private repository, but I am happy to move the explainer into this repository if the group is interested in centralizing discussion

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1671
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/issues/1671@github.com>

Received on Monday, 13 February 2023 04:55:36 UTC