Search code examples
progressive-web-appsservice-workerweb-push

When we add pwa app to homescreen. Do we get two service workers then for the same site one with browser and one with native app?


So Suppose we have a pwa app say X. When we install that app on homescreen, do we get two service workers one on browser say chrome and one in the native app? How push notifications will work in such cases, do we have to get subscription for native app separately for sending push notification to service worker of native app. And will these notifications appear in app or on chrome browser?

P.S By native app I mean pwa app installed on homescreen


Solution

  • Add to home screen does not add a native app to your device or desktop. It's still using browser resources. There's one service worker and one push notifications flow.