NetworkInformation.type

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.type read-only property returns the type of connection a device is using to communicate with the network.

Note: This feature is available in Web Workers.

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) No support No support No support No support
Feature Android Android Webview Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support (Yes) (Yes) 31.0 (31) No support No support No support (Yes)
unknown (Yes) (Yes) 33.0 (33) No support No support No support (Yes)
Available in workers ? ? 53.0 (53) No support No support No support ?

Document Tags and Contributors

 Last updated by: chrisdavidmills,