You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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), 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.
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
The text was updated successfully, but these errors were encountered:
I'm happy with this proposal. There's an observable change in behaviour for cases where the fetch listener changes over time (eg with Math.random() or Date.now()), but these cases are somewhat unpredictable anyway, because it depends on the service worker terminating and starting up to pick up the new function.
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), 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.
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
The text was updated successfully, but these errors were encountered: