-
Notifications
You must be signed in to change notification settings - Fork 22
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
consider maximum scope size #18
Comments
The infra doc says we should not enforce specific limits on algorithm inputs with regards to their size, resource usage, or equivalent. https://infra.spec.whatwg.org/#algorithm-limits Close this issue, feel free to reopen if needed. |
To re-characterize the root of my concern:
Note that this is specifically about the potential use of URLPattern by ServiceWorker registrations and since URLPattern is now a proposed primitive that exists outside of the ServiceWorkers spec, not all of the concerns are relevant to URLPattern other than if we wanted to impose limits on ServiceWorker registrations, URLPattern might need to expose the necessary primitive like a computed structured serialization size. There are 2 concerns that I think I had relating to this, at least the first of which could be relevant for URLPattern on its own:
|
(For clarity, I don't have the ability to do this.) |
Re-opened per Andrew's last comment. |
Do these limits belong in the URL Pattern specification? It seems like they might be specific to the use case and so could be specified in those specifications (in this case, the Service Worker spec, or whichever spec describes using URL patterns to define Service Worker scopes). |
Sure. This original issue is a holdover from the original explainer that proposed a service worker enhancement together with URLPattern. Maybe this issue should be ported over to the service worker static routing area (if applicable to that design). Or if its not an issue for static routing we could close this for now since the patterned scope effort is not being worked on. |
I'm fine for this issue to migrate to the static routing proposal. I can re-file there if its authors prefer versus them filing a more pragmatic, smaller issue. I know my comment above is a little dense; I'm also fine with a more terse issue of "enforce a minimum supported static route size" which translates to "have a WPT test that adds several routes with some long strings in it that should not fail". That is, the structured serialization sizing thing is a huge ask, just having a pragmatic test with big strings is fine. |
I think it probably makes sense to move this issue to the applicable downstream spec (where one exists). I could imagine bringing up sort of common minimum limits for consistency, perhaps as part of a future enhancement to #182. Thanks for your patience. :) |
Thanks for elaborating on that. Understood the root concerns. Not sure if 32KB is a reasonable number since that is the displayed size in the Chrome’s omnibox, but 2MB is maybe too large?
That makes sense to me. Also, I filed the issue on the static routing side. WICG/service-worker-static-routing-api#5 |
At the TPAC 2020 discussion @asutherland suggested that we should consider maximum scope size limits. While its theoretically possible for sites to stick large amounts of info encoded in the scope URL today, the scope list mechanism might encourage further size growth. We should have an interoperable agreement as to what is too much.
The text was updated successfully, but these errors were encountered: