Angular Service Worker on the browsers that do not support it

ⅰ亾dé卋堺 提交于 2019-12-04 10:56:29

The official response

The Angular SW only works in browsers which support service workers. This includes all of the application integration (e.g. the SwUpdate service).

If SWs are unsupported in the current browser.

  • The SW script and ngsw.json will never be downloaded.
  • Active attempts to interact with the SW, such as calling -
  • SwUpdate.checkForUpdate() will return rejected promises.
  • Passive attempts to listen to SW Observables such as SwUpdate.available will simply never trigger - the Observables will never emit.

Basically browsers that doesn't support service workers will silently fail. So anything in the background connected to the SW such as offline caching and push notifications will not work. The site will still work like any other site, just that the functionalities and features of PWA will not.

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