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
My PWA is working offline just fine, but I want to detect offline operation in javascript so I can display the status on a page, window.navigator.onLine doesn't seem to give the online status correctly. It will return true even if offline and disconnected. Is there a way to get offline/online status reliably?
The text was updated successfully, but these errors were encountered:
To respond to my own post, further research on this shows that navigator.onLine is not consistently implemented across browsers, and explains my problem. But while on this, does anyone know a reliable way to check connectivity? I'm trying to make sure my program does not try to do certain ajax calls when the app is disconnected. Using ajax itself to check for connectivity generally makes for bad performance.
My PWA is working offline just fine, but I want to detect offline operation in javascript so I can display the status on a page, window.navigator.onLine doesn't seem to give the online status correctly. It will return true even if offline and disconnected. Is there a way to get offline/online status reliably?
The text was updated successfully, but these errors were encountered: