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.
Properties
The NavigatorOnLine interface doesn't inherit any property.
NavigatorOnLine.onLineRead only- Returns a
Booleanindicating whether the browser is working online.
Methods
The NavigatorOnLine interface neither implements, nor inherit any method.
Specifications
| 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. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
| Desktop | Mobile | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Basic support | Chrome Full support Yes | Edge ? | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
Support on WorkerNavigator | Chrome ? | Edge ? | Firefox Full support 29 | IE ? | Opera ? | Safari ? | WebView Android ? | Chrome Android Full support 29 | Edge Mobile ? | Firefox Android Full support 35 | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
onLine | Chrome
Full support
Yes
| Edge Full support Yes | Firefox
Full support
3.5
| IE
Full support
8
| Opera
No support
No
| Safari Full support 5 | WebView Android
Full support
Yes
| Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 4 | Opera Android ? | Safari iOS Full support Yes | Samsung Internet Android ? |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- See implementation notes.
- See implementation notes.
See also
- The
Navigatorinterface that implements it. - Online and offline events