W3cubDocs

/DOM

NetworkInformation.type

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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

© 2005–2018 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