Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 16, 2024
1 parent 06f3c40 commit 0150221
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ According to the spec, the default behavior of the Service Worker is to control
after reloading the page. To make the SW always in control use this code in your SW:

```javascript
// take control of uncontrolled clients on first load
// ref: https://web.dev/service-worker-lifecycle/#clientsclaim
self.addEventListener('activate', (event) => {
event.waitUntil(clients.claim());
});
Expand Down

0 comments on commit 0150221

Please sign in to comment.