W3cubDocs

/DOM

NetworkInformation.type

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use 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 spec changes.

The NetworkInformation.type read-only property returns the type of connection a device is using to communicate with the network.

Syntax

var type = netInfo.type

Return value

An enumerated value that is one of the following values:

  • "bluetooth"
  • "cellular"
  • "ethernet"
  • "none"
  • "wifi"
  • "wimax"
  • "other"
  • "unknown"

Specifications

Specification Status Comment
Network Information API
The definition of 'type' in that specification.
Editor's Draft Initial definition

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 31 (31) Not supported Not supported Not supported
unknown (Yes) 33 (33) Not supported Not supported Not supported
Feature Android Android Webview Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support Not supported (Yes) 31.0 (31) Not supported Not supported Not supported (Yes)
unknown Not supported (Yes) 33.0 (33) Not supported Not supported Not supported Not supported

© 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/type