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

233
Visualizações
Why is navigator.onLine giving me the correct value on Chrome and Firefox, but fails on Edge and Opera?

I have a react component that does this once it is mounted:

const internetConnectivity = navigator.onLine;

This is how I tested it - I mount the component while having wi-fi, then I go back, turn off my wi-fi and mount the component again. The functionality works fine on Chrome and Firefox because internetConnectivity is true when the wi-fi is turned on, and false when it is off.

Unfortunately, on Edge and Opera internetConnectivity is true even after I've turned off the wi-fi. I checked that navigaor.onLine is supported by all 4 browsers, so something else is up with it.

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