Network Type & Speed

The Network Information API allows web applications to read the current network type and the maximum downlink speed and to subscribe for a notification when the network type has changed.

API glimpse

navigator.connection.type
Returns the type of the current connection, i.e. cellular, wifi, none etc.
navigator.connection.downlinkMax
Returns the theoretical maxinum downlink speed, in Mbps, for the underlying technology of the current connection.
navigator.connection.addEventListener('change', listener)
An event fired when the connection type has changed.

Resources