Online/offline status
Events to indicate when the user's connected (online
and offline
events) and the navigator.onLine
property to see current status.
IE | Edge | Firefox | Chrome | Safari | Opera | iOS Safari | Opera Mini | Android Browser | Blackberry Browser | Opera Mobile | Chrome for Android | Firefox for Android | IE Mobile | UC Browser for Android | Samsung Internet | QQ Browser | Baidu Browser |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
49 | |||||||||||||||||
56 | 9.3 | 4.4 | |||||||||||||||
14 | 52 | 57 | 10 | 10.0-10.2 | 4.4.3-4.4.4 | 4 | |||||||||||
11 | 15 | 53 | 58 | 10.1 | 44 | 10.3 | all | 56 | 10 | 37 | 57 | 52 | 11 | 11.4
See notes:
|
5 | 1.2 | 7.12 |
54 | 59 | TP | 45 | ||||||||||||||
55 | 60 | 46 | |||||||||||||||
56 | 61 |
Notes
"online" does not always mean connection to the internet, it can also just mean connection to some network.
Early versions of Chrome and Safari always reported "true" for navigator.onLine
-
0
Safari 7.0 supports only the event listener on
window
, and not ondocument.body
-
1
Seems to support
navigator.onLine
but notonline
/offline
events. -
2
IE8 only supports the
online
/offline
events ondocument.body
, rather thanwindow
. -
3
Desktop Firefox responds to the status of its "Work Offline" mode. If not in that mode,
navigator.onLine
is alwaystrue
, regardless of the actual network connectivity status. See bug for details.