Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
Is there a way to know if a service worker has been terminated or restarted?

We can't rely on global variables in a service worker, as the global state is wiped out each time the service worker is terminated (and eventually restarted).

How does one know when the service worker has been terminated? How does one know when it is restarted? There doesn't seem to be any lifecycle event that we can hook into.

What I'm looking for is something like self.addEventListener('terminate', async () => { and/or self.addEventListener('restart', async () => {.

Am I missing something? 🤨

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda