Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

149
Visualizações
Window.onUnload on all tabs

I'm researching if there is a way that window.onunload event gets fired on inactive tabs in Chrome browser.

The idea is that if i keep a page's tab active (let's say its index is 3), the event will fire if I (for example) close the browser. However, if i am navigating on some other page(s), the onUnload event on tab-index 3 (my page) will not fire (as it is not the active tab)

To my opinion, I would have thought that onunload gets fired for all tabs in the browser... but as to my tests... it only fires on the active-tab.

Is there any way to register a listener to detect if the browser closes even if (my) site is not lucky to sit in the "active" tab?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda