Baseline Widely DOM API
api.Navigator.onLine
Granular MDN Browser Compat Data support history across 14 tracked browsers.
Specification Area
DOM API
Standard track
First Core Launch
Firefox 1.5
2005-11-29
Core-3 Stability
1,287d (3.5y)
Last: Safari (2009-06-08)
Baseline Feature
Widely
Online status
Browser Support Timeline
Notes (5)
Chrome: Earlier versions of Chrome incorrectly return true when a tab is first opened, but it starts reporting the correct connectivity status after the first network event. Windows: 11, macOS: 14, ChromeOS: 13, Linux: Always returnstrue. For history, see bug 40530968.Firefox: Since Firefox 4 the browser returns true when 'Work Offline' mode is disabled and false when it is enabled, regardless of actual connectivity. Since Firefox 41, on OS X and Windows, the returned values follow the actual network connectivity, unless 'Work offline' mode is selected (where it will always return false).WV And: Can incorrectly return true, see bug 41369933.Opera, Op And: From Opera 11.1 until Opera 12.1, the browser returns true when 'Work Offline' mode is disabled and false when it is enabled, regardless of actual connectivity.IE: in Internet Explorer 8 'online' and 'offline' events are raised on the document.body; under IE 9 they are raised on both document.body and window.Full Browser Compatibility Table
| Browser | Type | Version | Release Date | Status / Caveats |
|---|---|---|---|---|
| Chrome | desktop | 2 | 2009-05-21 | Supported |
| Firefox | desktop | 1.5 | 2005-11-29 | Supported |
| Safari | desktop | 4 | 2009-06-08 | Supported |
| Edge | desktop | 12 | 2015-07-29 | Supported |
| Chrome Android | mobile | 18 | 2012-06-27 | Supported |
| Firefox for Android | mobile | 4 | 2011-03-29 | Supported |
| Safari on iOS | mobile | 3.2 | 2010-04-03 | Supported |
| WebView Android | mobile | 4.4 | 2013-12-09 | Supported |
| WebView on iOS | mobile | 3.2 | 2010-04-03 | Supported |
| Samsung Browser | mobile | 1.0 | 2013-04-27 | Supported |
| Opera | desktop | 3 | 1997-12-01 | Supported |
| Opera Android | mobile | 10.1 | 2010-11-09 | Supported |
| Deno | server | — | — | — |
| Node.js | server | — | — | — |
| Bun | server | — | — | — |
| Quest Browser | xr | 5.0 | 2018-07-01 | Supported |
| Internet Explorer | desktop | 4 | 1997-09-30 | Supported |