Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServiceWorker static routing API #863

Closed
1 task done
yoshisatoyanagisawa opened this issue Jun 19, 2023 · 9 comments
Closed
1 task done

ServiceWorker static routing API #863

yoshisatoyanagisawa opened this issue Jun 19, 2023 · 9 comments
Assignees
Labels
Missing: Multi-stakeholder support Lack of multi-stakeholder support Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes Review type: CG early review An early review of general direction from a Community Group Topic: Service Workers Venue: WICG

Comments

@yoshisatoyanagisawa
Copy link

yoshisatoyanagisawa commented Jun 19, 2023

こんにちは TAG-さん!

I'm requesting a TAG review of ServiceWorker static routing API.

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.

  • Explainer¹ (minimally containing user needs and example code): url
  • User research: it is a well-studied phenomenon that faster sites are better for users, but we have not conducted any user studies specifically on this feature.
  • Security and Privacy self-review²: url
  • GitHub repo (if you prefer feedback filed there): url (proposed to move to WICG)
  • Primary contacts (and their relationship to the specification):
  • Organization/project driving the design: Google Chrome
  • External status/issue trackers for this feature (publicly visible, e.g. Chrome Status):

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • The group where the incubation/design work on this is being done (or is intended to be done in the future): W3C Service Workers Working Group
  • The group where standardization of this work is intended to be done ("unknown" if not known): W3C Service Workers Working Group
  • Existing major pieces of multi-stakeholder review or discussion of this design: Declarative routing w3c/ServiceWorker#1373
  • Major unresolved issues with or opposition to this design: Maybe no as far as I took a glance at Declarative routing w3c/ServiceWorker#1373
  • This work is being funded by: Google

You should also know that...

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

@maxpassion
Copy link

Hi @yoshisatoyanagisawa, We had a discussion in our breakout C meeting this week. One concern is that this proposal uses URLPattern but URLPattern has not been standardized. Is there any update on this?

@yoshisatoyanagisawa
Copy link
Author

yoshisatoyanagisawa commented Aug 31, 2023

Thank you for reviewing our proposal!
@domenic @wanderview Do you know the current URLPattern status?

@domenic
Copy link
Member

domenic commented Aug 31, 2023

URLPattern is fully specified. It's true that it hasn't moved to a standards organization, but that's due to other browsers choosing not to implement, which isn't something we can speak to; you'd have to ask representatives of other browsers about their plans in that area.

@torgo torgo modified the milestones: 2023-08-28-week, 2023-09-04-week Sep 3, 2023
@torgo
Copy link
Member

torgo commented Sep 5, 2023

Hi @domenic - thanks for that clarification. As with a number of other current reviews, in that case, I'd like to express concerns that we are building new capabilities on top of shaky ground – that is, existing specifications that do not have consensus and do not have multiple implementations across multiple browsers.

Further to that, we have another open review, Compression Dictionary Transport
which also makes use of "URL Patterns" but does not appear to reference the URLPattern spec.

Could there be an option here to work together to specify static routing without relying on URLPattern, or to specify a fall-back?

Alternatively, is there a way forward to bring URLPattern forward for standardization that could unblock multiple implementations?

@torgo torgo added the Missing: Multi-stakeholder support Lack of multi-stakeholder support label Sep 5, 2023
@domenic
Copy link
Member

domenic commented Sep 5, 2023

Could there be an option here to work together to specify static routing without relying on URLPattern, or to specify a fall-back?

I don't think it's a good idea to invent a second URL pattern syntax for routing on the web platform, and you need some sort of syntax for specifying URL patterns if you're to statically give a pattern for which URLs are routed...

Further to that, we have another open review, Compression Dictionary Transport
which also makes use of "URL Patterns" but does not appear to reference the URLPattern spec.

Thanks for highlighting this! We will work to ensure that feature uses the platform's common URL pattern syntax which is designed in the URL pattern spec. I filed WICG/compression-dictionary-transport#48, but it looks like this is already under discussion in WICG/compression-dictionary-transport#42.

Alternatively, is there a way forward to bring URLPattern forward for standardization that could unblock multiple implementations?

Again, I think there's nothing blocking this besides the other implementations' interest. Chrome has done everything we can by laying out a full specification, web platform tests suite, and so on. The "way forward" is for another implementation to support standardization, and that's not something the Chrome team has control over. I'd really encourage the TAG to bring these concerns up with the other engines directly, instead of the current approach (which I see across multiple reviews) of asking Chrome team members for information on the future plans of other companies.

@kenchris
Copy link

kenchris commented Sep 5, 2023

URLPattern is quite popular judging from our polyfill https://www.npmjs.com/package/urlpattern-polyfill which has 3.5M weekly downloads. It is also implemented in Deno https://deno.land/api@v1.36.4?s=URLPattern

@torgo
Copy link
Member

torgo commented Sep 11, 2023

I'd really encourage the TAG to bring these concerns up with the other engines directly, instead of the current approach (which I see across multiple reviews) of asking Chrome team members for information on the future plans of other companies.

@domenic I think you know it's not the TAG's job to sell Google's vision of the web to other browser makers. Having said that, we are trying to drive cross-platform consensus around topics such as Powerful APIs and Web Privacy - I suggest you attend those sessions at this week's TPAC plenary to learn more.

@torgo torgo modified the milestones: 2023-09-04-week, 2023-10-09-week Oct 8, 2023
@torgo torgo added the Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes label Oct 10, 2023
@torgo
Copy link
Member

torgo commented Oct 10, 2023

We're going to go ahead and close this with "satisfied with concerns" - we're happy with the overall design but we remain concerned about URLPattern's status on the standards track. Considering there seems to be a way forward for standardization, we'd encourage you to pursue that path.

@torgo torgo closed this as completed Oct 10, 2023
@chrishtr
Copy link

Considering there seems to be a way forward for standardization, we'd encourage you to pursue that path.

FYI the URL Pattern spec is now at the WHATWG and Webkit is positive on this proposal.

mkruisselbrink added a commit to w3c/ServiceWorker that referenced this issue Feb 22, 2024
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.

Explainer: https://github.com/WICG/service-worker-static-routing-api
TAG review: w3ctag/design-reviews#863

Co-authored-by: Takashi Nakayama <tnak@chromium.org>
Co-authored-by: Shunya Shishido <sisidovski@users.noreply.github.com>
Co-authored-by: Marijn Kruisselbrink <mek@chromium.org>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing: Multi-stakeholder support Lack of multi-stakeholder support Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes Review type: CG early review An early review of general direction from a Community Group Topic: Service Workers Venue: WICG
Projects
None yet
Development

No branches or pull requests

7 participants