Online status
The navigator.onLine
property is a boolean for whether the browser is connected to some network (though not necessarily the internet). The online
and offline
events fire when the connection state changes.
Status
Baseline Widely Available (since 2018-01-29)
MDN documentation
Specifications
- HTML (#navigator.online), from HTML Workstream (WHATWG).
- HTML (#event-online), from HTML Workstream (WHATWG).
Browser support (view on caniuse.com)
- Chrome 2 Released on 2009-05-21
- Chrome Android 18 Released on 2012-06-27
- Edge 12 Released on 2015-07-29
- Firefox 1.5 Released on 2005-11-29
- Firefox for Android 4 Released on 2011-03-29
- Safari 4 Released on 2009-06-08
- Safari on iOS 3.2 Released on 2010-04-03
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist