-
Notifications
You must be signed in to change notification settings - Fork 213
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
[PWA URL Handling] General feedback #300
Comments
Appreciate the feedback. Here are my thoughts below. Cross origin
Patterns vs Code
Format
Questions
|
Note that the subject of vanity URLs also pertains to w3c/ServiceWorker#1457.
The intent is for the |
OS integrationI mentioned the requirement for cross-origin url matching as one reason why we need the format to be declarative in the web app manifest. There is another reason: once this effort gets underway, we would like to work on registering the url handling registrations with OSes. This would help PWAs behave more like native applications.
|
I read the Correct me if I'm wrong, but I believe that explainer does not allow for sub-domain wildcard in the It seems difficult to match a wildcard prefix with predictable performance if the |
I think we can support wildcards in the host. If you used a pattern like that for service workers then the service worker API would reject. Basically we would compile the pattern to an internal representation with things like "has wildcard in host", etc and then the other APIs would check that. The syntax is not finalized, but for hosts I was expecting to do something more like this:
The |
But in short, if you have requirements lets talk. |
Hi, I have some additional feedback. As one of the authors of the WICG/sw-launch explainer, I think there's a lot of overlap here with sw-launch so I'm interested in either combining the two proposals, or teasing them apart so that they provide mutually exclusive functionality. I see you're already planning an update to the explainer that takes sw-launch into account. Further feedback:
|
Just a data point on one item here:
This kind of redirect is quite heavyweight if the PWA wants to support offline for the vanity URL. You need a service worker installed on both origins. In browsers that do site isolation you then end up creating a process just to run the vanity URL SW that redirects to the real origin. Finally you create a second process to run the real origin SW and page. See w3c/ServiceWorker#1457 for more discussion. |
I have also wondered if this proposal should lean on origin policy instead of creating another well-known URL location. But it also makes me kind of worried about the issues that have arisen for origin policy. Mainly, trying to support the following simultaneously:
Origin policy has run into difficulties here, though, because it wants to consult policies for cross-origin subresource loads. Maybe its not as difficult for only navigations like this use case is targeted at. I think there is some discussion of updating in the explainer, but it would be nice if it explicitly covered how offline use cases would be satisfied. |
Closing here. I will split up this thread into individual issues at https://github.com/WICG/pwa-url-handler/issues. |
This is just my personal feedback, I haven't coordinated with others.
URI vs URL
From https://url.spec.whatwg.org/#url-apis-elsewhere
Patterns vs code
The explainer proposes a new pattern matching format. I think this comes with a lot of risk. We don't want a situation where another spec needs a pattern, but the one here doesn't quite fit, so they create yet another format etc etc.
@wanderview is looking into a more general URL pattern matcher: https://github.com/wanderview/service-worker-scope-pattern-matching/blob/master/explainer.md.
However, does this need to be declarative? In service worker land, we generally prefer code to config, and only use config if we have a good reason why code won't work. Eg, something like a "launch" event could work here.
Cross origin
Can you go into more detail on why the cross-origin stuff is important? It seems pretty risky, and again we'd want to avoid a situation where we end up creating lots of things that do almost do the same thing.
The text was updated successfully, but these errors were encountered: