Re: [w3c/manifest] Add a unique identifier for a PWA (#586)

@philloooo wrote:
> In the alternative case, If a manifest is updated , the document that's within the previous navigation scope will update their manifest link to the latest one or the document url will redirect to the new document url, but still keep the stable ID

That's an interesting solution, I hadn't considered the possibility of pages which are no longer within the navigation scope of the application continuing to link to the manifest. Could that cause problems for new users who come along and install the web app from those old pages though? That might be OK, as long as the page doesn't become part of a new navigation scope (e.g. if a scope is split off into two separate apps or two apps are combined into one scope).

> if the apps' origin is not changed.

This is of course another limitation of "an opaque token that uniquely identifies the app within the origin's namespace", it may not be safe to move the app/manifest to a different origin, including switching CDN.

> I think either options, the user agents always have ways to update. The difference is with your proposal of how to do the redirect,
the ID will be changed and we could hit a race condition for user agents, that loading the latest page finds the manfiest_v2,
before existing installed app v1 is updated to v2, and result in duplicated apps being installed. Or we need to follow what @ralphch0 said to go through all existing apps to update their manifests whenever you browse to a link. This also gets trickier with user agents that support syncing apps across devices.

I agree that could be a problem. It seems recoverable though, by merging app installations once a redirect to the new ID is detected.

Ultimately I think if you want the start URL, scope _and_ manifest URL to all be changeable, then there are going to be edge cases where things can get into a broken state. Introducing a new non-web ID namespace into the equation can solve some of those problems, but also create others (e.g. getting stuck in an update loop where two different pages point to two different manifests claiming the same ID).

I posit that there is no perfect solution, which is why after about a decade of discussing this topic (I'm [not joking](https://lists.w3.org/Archives/Public/public-webapps/2012AprJun/0718.html)), we still haven't landed on a solution upon which everyone agrees.

I still personally think manifest URL is the best solution. The second best solution I've come across is origin + scope, but that has problems too. Bad experiences from packaged apps in Firefox OS make me very wary of introducing a new non-web ID namespace for web apps. If there absolutely has to be an ID inside the manifest, I would suggest it should at least be a URL which defaults to manifest URL, but I'm concerned that will paint us into a corner where #668 (and therefore some of the use cases described above) become difficult or impossible.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/586#issuecomment-775312668

Received on Monday, 8 February 2021 17:29:52 UTC