Methods
# static skipWaiting() → {Promise.<boolean>}
Skips the waiting phase of a service worker update and immediately activates the new service worker version.
A Promise that resolves to true if the operation was successful and new service worker is activated, false otherwise
Promise.<boolean>
Example
const activated = await skipWaiting();
if (activated) {
console.log("New service worker activated and controlling the page");
// You may want to notify the user and reload the page to apply the changes for the new service worker version
}