Description
Version
3.11.0
Environment info
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz
Binaries:
Node: 12.5.0 - C:\Develop\Laragon\bin\nodejs\node-v12\node.EXE
Yarn: 1.17.3 - C:\Develop\Laragon\bin\yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Develop\Laragon\bin\nodejs\node-v12\npm.CMD
Browsers:
Edge: 44.18362.387.0
Hi!
When launching the app if already installed, the manifest is not updating, as seen here:
https://developers.google.com/web/fundamentals/integration/webapks#update-webapk
"Chrome will only update a WebAPK if the Web Manifest URL does not change. If you change the web page from referencing /manifest.json to reference /manifest2.json, the WebAPK will no longer update. (Don't do this!)"
As the assets version is attached to the tag ("manifest.json?v=1.1"), isn't it detected as a different file and not updated?
I'm having trouble with this, since I have an app and changed it icon, but id didn't update on any of the devices that has it installed.
Steps to reproduce
-
Create 3 projects using vue-cli with pwa plugin.
-
Create 2 sets of 192x192 and 512x512 images (I created a red and a green circle) and add the first set to all 3 manifest.json files.
-
In projects number 1 and 3 leave the default config, without changing anything.
-
In project number 2, configure vue.config.js like this:
pwa: {
assetsVersion: '1.0'
}
- Deploy each project and install them to your homescreen. You'll have this as a result:
-
In all 3 projects, update the paths to the icons in manifest.json to the 2nd set of icons.
-
In project number 2, update vue.config.js to this:
pwa: {
assetsVersion: '2.0'
}
- In project number 3, change manifest.json name to manifest2.json and update vue.config.js to this:
pwa: {
manifestPath: 'manifest2.json'
}
-
Again, deploy all 3 projects.
-
Wait for 1 or more days and then open the apps on your phone (it has to be connected to wi-fi and charging).
-
Only project number 1 icons will update:
So, to me, this proves that adding the assets version to the manifest URL is in fact a bad practice, as the server seems to interpret it as a different manifest and this goes against chrome best practices:
Chrome will only update a WebAPK if the Web Manifest URL does not change. If you change the web page from referencing /manifest.json to reference /manifest2.json, the WebAPK will no longer update. (Don't do this!)
Edit: added steps to reproduce.