WEB-264Recommended
Give the installed app a fixed identity
Set id and scope in the web app manifest, and never change id once people have installed the app.
How to do it
Without id, the browser uses start_url as the app's identity. Changing start_url later, such as adding a tracking parameter, then counts as a new app. People get a second icon and lose the link to the first. Set id to a path such as /. Set scope to the part of the site the app covers, so links outside it open in the browser. Keep start_url inside scope. The rest of the manifest follows Let people install the site.
Examples
JSON example
{
"id": "/",
"name": "Example Studio",
"start_url": "/app/?source=pwa",
"scope": "/app/",
"display": "standalone"
}
How to check
A test reads the served manifest. id and scope are present, start_url lies inside scope, and id equals the value stored in the test from the first release.
Sources
Related rules
- WEB-225 Let people install the site in Website
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/when-things-break/manifest-id-and-scope">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.