0 votes
in JavaScript by
How do you reuse information across service worker restarts?

1 Answer

0 votes
by

The problem with service worker is that it gets terminated when not in use, and restarted when it's next needed, so you cannot rely on global state within a service worker's onfetch and onmessage handlers. In this case, service workers will have access to IndexedDB API in order to persist and reuse across restarts.

Related questions

0 votes
asked Sep 28, 2023 in JavaScript by AdilsonLima
0 votes
asked Sep 10, 2023 in VueJS by DavidAnderson
...