What are the difference between `pushManager.subscribe` and `pushManager.getSubscription` Service Worker's What are the difference between `pushManager.subscribe` and `pushManager.getSubscription` Service Worker's google-chrome google-chrome

What are the difference between `pushManager.subscribe` and `pushManager.getSubscription` Service Worker's


The problem is that your service worker is registered, but it isn't active yet.

You can use navigator.serviceWorker.ready instead of subscribing right after registering the service worker.

If you want to make the service worker active as soon as possible, you can use skipWaiting and Clients.claim, as described in this ServiceWorker Cookbook recipe.