This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
The NetworkInformation interface provides information about the connection a device is using to commuinicate with the network and provides a means for scripts to be notified if the connection type changes. The NetworkInformation interfaces cannot be instantiated. It is instead accessed through the connection property of the Navigator interface.
This interface also inherits properties of its parent, EventTarget.
NetworkInformation.type Read only
bluetoothcellularethernetnonewifiwimaxotherunknownNetworkInformation.downlinkMax Read only
NetworkInformation.onchangechange is fired on this object.This interface also inherits methods of its parent, EventTarget.
| Specification | Status | Comment |
|---|---|---|
| Network Information API The definition of 'NetworkInformation' in that specification. | Editor's Draft | Initial definition |
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | 20 webkit | 31.0 moz[1] | No support | No support | No support |
| Feature | Android | Android Webview | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
|---|---|---|---|---|---|---|---|
| Basic support | No support | No support | 31.0 moz[1] | No support | No support | No support | No support |
[1] The Network API can be disabled using the dom.network.enabled preference. From Gecko 12.0 to Gecko 30.0 included, this interface was called Connection and had different members. As of Gecko 12.0, the Network API is implemented for Android systems only. Support for Linux (bug 712442) and Windows (bug 721306) systems is in progress.
Navigator interface that implements it.
© 2005–2017 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/NetworkInformation