Intent to Prototype: ServiceWorker static routing API

238 de afișări
Accesați primul mesaj necitit

Yoshisato Yanagisawa

necitită,
8 iun. 2023, 03:42:3108.06.2023
– blink-dev

Contact emails

yyana...@google.com, sisid...@google.com


Explainer

https://github.com/yoshisatoyanagisawa/service-worker-static-routing-api


Specification

None


Summary

This API allows developers to configure the routing, and allows them to offload simple things ServiceWorkers do. If the condition matches, the navigation happens without starting ServiceWorkers or executing JavaScript, which allows web pages to avoid performance penalties due to ServiceWorker interceptions.


Blink component

Blink>ServiceWorker


Motivation

Starting ServiceWorkers is known to be a slow process, and web users need to wait for its startup if the ServiceWorker intercepts loading the page resources. At the same time, the ServiceWorker brings flexibility to the transport layer, and it behaves as a client-side proxy. Developers can implement offline support or provide client-side content modification with it. Currently, ServiceWorkers intercept all requests for pages within their scope, which brings a performance penalty within the scope.


Initial public proposal

https://github.com/yoshisatoyanagisawa/service-worker-static-routing-api


Debuggability

The registered router rules will be visible via chrome://serviceworker-internals or DevTools.


Is this feature fully tested by web-platform-tests?

It will be before shipping


Flag name

#service-worker-static-router


Requires code in //chrome?

False


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1371756


Estimated milestones

No milestones specified


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5185352976826368


Răspundeți tuturor
Răspundeți autorului
Redirecționați
0 mesaje noi