Closed diekus closed 9 months ago
While it looks nice, we can't just have the manifest_id be the only option here... although this has given me a crazy idea....
So if we forced the manifest_id here to be serve-able (e.g. you load the manifest id and try to install from there)..... then that could push us towards a nice future here where the identity can be used to find the app. this is NOT the case necessarily now - right now the identity is not guarenteed to be serve-able, as we've never needed that. specifically:
- You can set any string on the id, and it will be appended to the origin & parsed as a url. Sites do this today.
- Mobile sites assumed the identity for updating was based on the manifest_url for a long time (as historically this is how it worked), and now some specify that as the id for backwards-compatibility.
So - sadly we might make certain sites ineligible for use of this new API shape... unless we added options?
Another interesting thing we could encourage here is that the site that is loaded doesn't have to be the start_url, and can be a simple install url like
https://calendar.google.com/calendar/installwebapp
. In fact - that would be a great manifest_id maybe?Interested in thoughts from you and @b1tr0t and @mgiuca
I chatted with @b1tr0t:
We COULD have a short-case version of this API that only takes the manifest_id
, and then says "We will load this as a page, look for a manifest, and isntall it if the id of that manifest == manifest_id
you specified". However, this probably perpetuates confusion about manifest id, start_url, etc, hiding a foot-gun that will hurt the developer later. It seems better just to force a consistent api shape of "install X, find at Y". So something like:
navigator.install("https://example.com/my_app_id", {install_url: "https://example.com/install_url.html"});
This would error if there is no manifest at install_url (I guess that the installability options), or if the computed manifest id from what was found at that install url wasn't the manifest_id.
What do you think? @tomayac as well.
I chatted with @tomayac and created this doc trying to explain better my reasoning for manifest_id + install_url - PTAL
SGTM, I don't want to prevent incremental progress.
Another doc I made recently is https://bit.ly/web-install-api-shape-install-url, which (while dense) hopefully helps communicate some of the problems here.
Hola, these changes address pot-TPAC discussions and TAG review concerns about the Web Install API.