Navigator.connection

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

The Navigator.connection read-only property returns a NetworkInformation object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered. This could be used to select high definition content or low definition content based on the user's connection.

Syntax

networkInformation = navigator.connection

Value

A NetworkInformation object.

Specifications

Specification Status Comment
Network Information API
The definition of 'Navigator.connection' in that specification.
Draft Initial specification

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
connection
Experimental
Chrome Full support 61Edge Full support ≤79Firefox Full support Yes
Disabled
Full support Yes
Disabled
Disabled This feature is behind the dom.netinfo.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support YesSafari No support NoWebView Android Full support 50Chrome Android Full support 38Firefox Android Full support 14
Notes
Full support 14
Notes
Notes The Network API is enabled by default. Can be disabled using the dom.netinfo.enabled preference.
Opera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support 3.0

Legend

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also