Available in Chrome 147+ | View on GitHub | Browse Samples
This is the "Old App" (e.g. the 'migrating from' app) that is set up to perform a forced migration to the "New App", located here.
This feature allows a PWA to migrate to a new origin or identity. Said another way, this feature allows a PWA to change it's id
member
(MDN)
to a different value, as long as the origin of the new id is same-site as the current one.
This particular app is set to perform a forced migration, which requires that the title and icons do you change.
{
"name": "PWA Demo Old Forced App",
"short_name": "Old Forced App",
"description":
"This is an 'old' app that the developer wants to migrate to a new same-site origin or same-origin id.",
"id": "https://googlechrome.github.io/pwa-migration/migrate_from_forced/",
"start_url": "index.html",
"display": "standalone",
"scope": "./",
"icons": [
{
"src": "icon.png",
"sizes": "144x144",
"type": "image/png"
}
],
"migrate_to": {
"id": "https://googlechrome.github.io/pwa-migration/migrate_to/",
"install_url": "https://googlechrome.github.io/samples/pwa-migration/migrate_to/index.html"
}
}To confirm that the migration is OK with the 'old' app origin, a key must be added to the
/.well-known/web-app-origin-association file of the id of the 'new' app, with
allow_migration: true
{
"https://googlechrome.github.io/pwa-migration/migrate_to/": {
"allow_migration": true
}
}