Skip to content
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

What if an app changes their manifest URL? #22

Open
alancutter opened this issue Feb 2, 2021 · 2 comments
Open

What if an app changes their manifest URL? #22

alancutter opened this issue Feb 2, 2021 · 2 comments
Assignees

Comments

@alancutter
Copy link
Contributor

The web-app-origin-association file currently identifies other PWAs via their manifest URL:

{
    "web_apps": [
        {
            "manifest": "https://partnerapp.com/manifest.json",
            "details": {
                "paths": [
                    "/public/data/*"
                ]
            }
        }
    ]
}

There is active discussion around speccing an "app ID" with the intention of allowing sites to update their start_url and manifest URLs.
w3c/manifest#586
In this discussion it mentions sites using versioned manifest URLs. This proposed API would be incompatible with that practice.

@dmurph
Copy link

dmurph commented Feb 10, 2021

Explainer & suggested solution from us is here at this explainer:
https://github.com/philloooo/pwa-unique-id/blob/main/explainer.md

@LuHuangMSFT LuHuangMSFT self-assigned this Jun 3, 2021
@LuHuangMSFT
Copy link
Collaborator

If I understand the current implementation of id correctly, the global id is either the start URL, or the start URL's origin+the specified id from the manifest id field.

This allows a URL analogous to our current use of the manifest URL to uniquely identify a PWA.

The proposed change that would resolve this issue is to replace manifest with unique_id, which is itself a URL. During validation, instead of searching WAOA for the URL where an app's manifest was downloaded, search for the calculated "global id" of the app.

New example:

{
    "web_apps": [
        {
            "unique_id": "https://partnerapp.com/manifest.json",
            "details": {
                "paths": [
                    "/public/data/*"
                ]
            }
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants