Intent to Ship: PWA manifest unique id - desktop

136 views
Skip to first unread message

Phillis Tang

unread,
Sep 27, 2021, 6:08:14 PM9/27/21
to blin...@chromium.org, pwa-dev

Contact emails

phi...@chromium.orgpwa...@chromium.org

Explainer

https://github.com/philloooo/pwa-unique-id/blob/main/explainer.md

Specification

https://github.com/w3c/manifest/pull/988

Design docs


https://docs.google.com/document/d/16kWW_MBrdtKOMud41vobrOXUPqIL5tITWGiBk9UIDEs/edit?usp=sharing&resourcekey=0-I3w9uAOGPk96Uqkn00ZVtw

Summary

Define an optional id field in app manifest that's used to globally identify the web app. If the id is not specified, start_url will be used as the default id.



Blink component

Blink

TAG review

https://github.com/w3ctag/design-reviews/issues/668

TAG review status

Issues addressed

Risks



Interoperability and Compatibility

Low interoperability & compatibility risks: For browsers that do not implement it yet, a web app that specifies the id field will just be ignored and function as normal. The only behavior difference is the app can update its start_url when it has id specified on Chrome but not on other browsers.



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/559)

WebKit: No signal (https://lists.webkit.org/pipermail/webkit-dev/2021-August/031949.html)

Web developers: Positive (https://github.com/w3c/manifest/pull/988
manfest spec editors marcoscaceres overall agree to the change.

Draft implementation done in FIrefox https://phabricator.services.mozilla.com/D126331 

https://github.com/kaiostech/gecko-b2g/issues/56#issuecomment-923121049

Ergonomics

None



Activation

The feature will go together with UX changes in devtool to instruct users. A devrel post is published to inform developers about the new feature.

https://developer.chrome.com/blog/pwa-manifest-id/



Security

https://docs.google.com/document/d/1-BaZAhM3eSh9CP8h8Q_OEV4gsZ9aJ46fl2ef5XeSmcg/edit?usp=sharing



Debuggability

The raw manifest json can be viewed in devtools->Application->Manifest. The computed app id can be viewed in devtools->Application->Identity-> Computed App Id



Is this feature fully tested by web-platform-tests?

Tentative manual tests are written.

DevTrial instructions

https://github.com/philloooo/pwa-unique-id/blob/main/HOWTO.md

Flag name

WebAppEnableManifestId

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1182363

Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1182361

Estimated milestones

DevTrial on desktop94


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/6064014410907648

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/u/1/a/chromium.org/g/blink-dev/c/hlxPHfg9GRc/m/M1jbEffUBQAJ


This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Sep 29, 2021, 12:13:30 PM9/29/21
to Phillis Tang, blink-dev, pwa-dev
There's a lot there, so I want to verify I understand what the feature does:
Without an ID, the browser identifies a PWA based on its start_url, and hence if that URL changes over time, that can result in e.g. double installs.
With an ID, even if the start_url changes, the browser would be able to know that a certain PWA is already installed.
Is that correct?
Am I assuming correctly and the ID matching is limited to the same origin?
 


Specification

https://github.com/w3c/manifest/pull/988

Design docs


https://docs.google.com/document/d/16kWW_MBrdtKOMud41vobrOXUPqIL5tITWGiBk9UIDEs/edit?usp=sharing&resourcekey=0-I3w9uAOGPk96Uqkn00ZVtw

Summary

Define an optional id field in app manifest that's used to globally identify the web app. If the id is not specified, start_url will be used as the default id.



Blink component

Blink

TAG review

https://github.com/w3ctag/design-reviews/issues/668

TAG review status

Issues addressed

Risks



Interoperability and Compatibility

Low interoperability & compatibility risks: For browsers that do not implement it yet, a web app that specifies the id field will just be ignored and function as normal. The only behavior difference is the app can update its start_url when it has id specified on Chrome but not on other browsers.



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/559)

WebKit: No signal (https://lists.webkit.org/pipermail/webkit-dev/2021-August/031949.html)

Web developers: Positive (https://github.com/w3c/manifest/pull/988
manfest spec editors marcoscaceres overall agree to the change.

That's not web developer feedback. Any signals from folks that are likely to use this API in production sites?
 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CABcACaipyJnL_NKFcA-5__jy5BKJTFge0Ojf4KWhC6x%3DXR0KiA%40mail.gmail.com.

Phillis Tang

unread,
Sep 29, 2021, 1:50:41 PM9/29/21
to Yoav Weiss, blink-dev, pwa-dev
Hi Yoav,
Yes that's the correct use case. It avoids double installs, and also allows already installed apps to apply manifest updates with start_url changes.
And yes ID matching is limited to the same origin. See the processing algorithm.

Google Chat had to do manual migration when they changed start_url previously, so they mentioned they will use it when the next migration is needed. 

- PHillis

Phillis Tang

unread,
Sep 29, 2021, 2:18:05 PM9/29/21
to Yoav Weiss, blink-dev, pwa-dev
Another thing is that this feature is a blocker for other features that need a formally defined identifier for web apps to be referenced.
See in the scope extension proposal, it needs to use web app identifiers to reference other apps from different origins.

- Phillis

Yoav Weiss

unread,
Sep 30, 2021, 2:30:12 AM9/30/21
to Phillis Tang, blink-dev, pwa-dev
LGTM1. This seems like a small and useful addition to the PWA landscape.

Mike West

unread,
Sep 30, 2021, 7:06:39 AM9/30/21
to Yoav Weiss, Phillis Tang, blink-dev, pwa-dev

Daniel Bratell

unread,
Sep 30, 2021, 1:37:47 PM9/30/21
to Mike West, Yoav Weiss, Phillis Tang, blink-dev, pwa-dev
Reply all
Reply to author
Forward
0 new messages