How do you push Application updates on an installed PWA application?

拈花ヽ惹草 提交于 2019-12-11 18:05:39

问题


My question is, Is it possible for the Users to acquire these changes without having to REINSTALL the PWA application?

I have a PWA application deployed in Production. The client already installed the deployed PWA application in their MOBILE devices and I want to DEPLOY another patch of updates in the PWA application in the HTTP server.


回答1:


Another simple way to update application is using workbox-window. You can detect updates in PWA and restart your application to get the last updates. For more detail, I suggest you read this link




回答2:


I would suggest to read this link explaining in detail how the SW Updates work.

Long story short, if you deploy a new app version, the new SW will be installed on the client's side (using a separate/dedicated install event) and then activated when the users navigates to an URL different from the PWA one.

There is also a built in service workers feature called "fail safe". Within at most 24H the SW checks if a newer version is available and, if so, attempts to update to it.

I wrote a PWA series and here a post about Service Workers and caching strategies if you want to read more.



来源:https://stackoverflow.com/questions/57141930/how-do-you-push-application-updates-on-an-installed-pwa-application

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