skipWaiting()

A service worker method that makes a newly installed version activate immediately instead of waiting for old tabs to close.

In more detail

It is usually called in the install event handler or in response to a message from the page. It speeds up updates but means open pages may suddenly be served by new code that expects different files, so pair it with a prompt to refresh.

Related terms

Taught in

References