Replies: 3 comments
-
same issues for me too have you got any solution |
Beta Was this translation helpful? Give feedback.
-
navigator.onLine is in my opinion generally not suitable to do online/offline checks, see https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine The easy workaround is to just try doing a dummy http request (or a bare tcp connection if we're talking about rust) and see if it fails. But even that may not be 100% reliable though :/ |
Beta Was this translation helpful? Give feedback.
-
Im using a custom hook that pings a reliable endpoint 'https://www.google.com/generate_204' every 5 seconds to update connection status |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I want to connect remote database or embedded database on connection status and i have tried to use navigator.onLine property and it just returns true even though my internet is disconnected.
How do i solve this ?
Beta Was this translation helpful? Give feedback.
All reactions