Some operating systems like Windows or Android let users annotate certain network connections as metered, for example, to avoid operating system updates to be downloaded on the on-board Wi-Fi of an airplane, where each megabyte of data may be very expensive. This feature adds a boolean flag `metered` to the `NetworkConnection` interface (`navigator.connection.metered`) to inform developers of whether the current network is metered as per this operating system setting.

Motivation

More and more devices are permanently connected to the Internet, and connectivity is a fundamental requirement for many. Network connectivity depends on a lot of factors, some of which include the connection type (e.g., Wi-Fi, 3G, 4G, 5G, etc.), but also factors like the device's physical location (e.g., Wi-Fi on a moving train), or the user's preferences (e.g., a desire to not overly tax a data connection shared with others). Naive assumptions like "connected to Wi-Fi always means connectivity is granted and data is cheap" or the opposite "connected to cellular always means connectivity is spotty and data is expensive" no longer hold true, and in many cases never did. The Network Information API aims to provide a standard approach for web applications to query the current network status in a meaningful and privacy-preserving way.

Specification

Specification link


Proposal in a personal repository, no adoption from community

Status in Chromium

Blink>Network


In development (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owners

Search tags

netinfo, network information, metered,

Last updated on 2022-03-31