Apply changes to Web App Manifest on an installed PWA

一世执手 提交于 2019-12-12 10:37:34

问题


If I want to make changes to my Progressive Web App, e.g. a slight change on the app name, or update the logo, is it possible to force an update on all my users' installed apps?

I tried adding "?v=2" to the manifest URL,

<link rel="manifest" href="/manifest.json?v=2" />

And also forced an update on the service worker.

However, it doesn't seem to apply the new changes on the installed app.
I tried this on Google Chrome on Android.


回答1:


Forcing the update explicitly is not possible as per the spec. However, there's an ongoing discussion about it.

Are you completely sure your manifest.json wasn't served from the browser's cache? Or that the browser was actually served with the new HTML that referenced the renamed manifest.json?

My understanding was that you should just change the name (based on the content's hash, for instance) and let the browser do it's job. The spec says this way the browser should always request the new version. Not sure if the update should kick in immediately or before the next visit. However, I could be wrong.



来源:https://stackoverflow.com/questions/47762022/apply-changes-to-web-app-manifest-on-an-installed-pwa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!