pablocattaneo
4/5/2018 - 2:48 AM

Force Service worker to active

Force Service worker to active. #PWA #worbox3.0 #serviceWorkers

Source: https://developers.google.com/web/tools/workbox/modules/workbox-sw

// Activate Service Workers as soon as possible skipping the default service worker lifecycle.
workbox.skipWaiting(); // Force a service worker to become active, instead of waiting.
workbox.clientsClaim(); // Claim any currently available clients once the service worker becomes active.