You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The component currently fails to detect offline status reliably and produces many false positives.
From the navigator.onLine doc: while you can assume that the browser is offline when it returns a false value, you cannot assume that a true value necessarily means that the browser can access the internet.
Relying on navigator.onLine to detect offline status is a good idea. Relying on it to detect online status is not.
I suggest changing to reflect this, basically the logic would go like !navigator.online ? definitelyOffline : pollToDetectOnline
If that makes sense, I can PR this. I understand there's a concern with the polling volume and we don't want to be wasteful but as it currently is, there are tons of false positive conditions.
The text was updated successfully, but these errors were encountered:
Hey @ash0x0 We have logic that determines the Browser being used in the user agent. This should prevent any false positives like you are mentioning as they all have different definitions of "online". Can you share a sandbox or example of the false positives ? Particularly , what user agent is causing the false positives?
The component currently fails to detect offline status reliably and produces many false positives.
From the navigator.onLine doc:
while you can assume that the browser is offline when it returns a false value, you cannot assume that a true value necessarily means that the browser can access the internet.
Relying on
navigator.onLine
to detectoffline
status is a good idea. Relying on it to detectonline
status is not.I suggest changing to reflect this, basically the logic would go like
!navigator.online ? definitelyOffline : pollToDetectOnline
If that makes sense, I can PR this. I understand there's a concern with the polling volume and we don't want to be wasteful but as it currently is, there are tons of false positive conditions.
The text was updated successfully, but these errors were encountered: