DEV Community

Discussion on: πŸš€ Detecting If a User is Online/Offline with JavaScript

Collapse
 
dietergeerts profile image
Dieter Geerts

navigator.online on it's own for checking if a user is really online is not working. It only lets you know if there is network access, which isn't the same as "connected to the internet". So basically, it is useless, unless you application works in a closed off network or something....

Collapse
 
nialljoemaher profile image
Niall Maher

I've left a link to some of the issues with navigator.online in the article. Definitely not a good solution alone. The event listeners are the real magic for checking when people are using apps on the move.