The NavigatorOnLine interface contains methods and properties related to the connectivity status of the browser.
There is no object of type NavigatorOnLine, but other interfaces, like Navigator or WorkerNavigator, implement it.
The NavigatorOnLine interface doesn't inherit any property.
NavigatorOnLine.onLine Read only
Boolean indicating whether the browser is working online.The NavigatorOnLine interface neither implements, nor inherit any method.
| Specification | Status | Comment |
|---|---|---|
| HTML Living Standard The definition of 'NavigatorOnLine' in that specification. | Living Standard | No change from the latest snapshot, HTML5 |
| HTML5 The definition of 'NavigatorOnLine' in that specification. | Recommendation | Snapshot of HTML Living Standard with its initial specification. |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | Yes | ? | Yes | Yes | Yes | Yes |
Support on WorkerNavigator
|
? | ? | 29 | ? | ? | ? |
onLine |
Yes
|
Yes | 3.5
|
8
|
No
|
5 |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | Yes | Yes | ? | Yes | Yes | Yes | ? |
Support on WorkerNavigator
|
? | 29 | ? | 35 | ? | ? | ? |
onLine |
Yes
|
Yes | Yes | 4 | ? | Yes | ? |
Navigator interface that implements it.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/navigatorOnLine