この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください！
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.
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
This interface also inherits properties of its parent,
- Returns the type of connection a device is using to communicate with the network. It will be one of the following values:
- Returns the maximum downlink speed, in megabits per second (Mbps), for the underlying connection technology.
- The event that's fired when connection information changes and the
changeis fired on this object.
This interface also inherits methods of its parent,
|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||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||No support||No support||No support||No support|
 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.