standards-positions icon indicating copy to clipboard operation
standards-positions copied to clipboard

ServiceWorker static routing API

Open yoshisatoyanagisawa opened this issue 2 years ago • 5 comments

WebKittens

@annevk

Title of the spec

ServiceWorker static routing API

URL to the spec

https://w3c.github.io/ServiceWorker/

URL to the spec's repository

https://github.com/w3c/ServiceWorker

Issue Tracker URL

https://github.com/w3c/ServiceWorker/issues/1373

Explainer URL

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

TAG Design Review URL

https://github.com/w3ctag/design-reviews/issues/863

Mozilla standards-positions issue URL

https://github.com/mozilla/standards-positions/issues/828

WebKit Bugzilla URL

https://bugs.webkit.org/show_bug.cgi?id=269893

Radar URL

No response

Description

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.

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.

Venue: we plan to do incubation work in the discussion tracker of w3c/ServiceWorker, despite hosting the explainer in a private repository.

yoshisatoyanagisawa avatar Jun 19 '23 00:06 yoshisatoyanagisawa

In principle this idea seems reasonable, but this builds upon URLPattern (discussed in #61) which despite repeated requests hasn't been standardized.

annevk avatar Jun 19 '23 06:06 annevk

@annevk Thank you for your help, I think the venue issue of URLPattern was resolved. Do you think this status can be updated as well?

sisidovski avatar Nov 27 '23 12:11 sisidovski

URLPattern became the web standard, and it is actively maintained now.

Do you have any other concerns?

yoshisatoyanagisawa avatar Feb 05 '24 04:02 yoshisatoyanagisawa

FYI, but the ServiceWorker static routing API has been merged to the spec. https://github.com/w3c/ServiceWorker/commit/8d4b9dfbeea511955a259949f2bc01227f995fe2

yoshisatoyanagisawa avatar Feb 22 '24 08:02 yoshisatoyanagisawa

I discussed this with colleagues and this seems like a reasonable addition to us. Thanks for working on it!

As such I suggest we resolve this as "position: support" one week from now.

annevk avatar May 08 '24 07:05 annevk