Network Information API and Save-Data
Exposes estimated connection type, speed and data saver preference.
In one line
Can see a rough guess of your connection type, speed and data saver setting
Exposes estimated connection type, speed and data saver preference.
navigator.connection returns effectiveType (4g, 3g...), rtt rounded to 25 ms, downlink rounded to 25 kbps steps (max 10 Mbps) and saveData. Chrome on Android adds type (wifi, cellular); other browsers do not support it.
What it can and can't do
What the user does: Nothing. It happens when the page loads, or when your connection changes
It can
- Get a speed class such as 4g or 3g
- Get rounded delay and download speed, with speed capped at 10 Mbps
- Learn if Data Saver is on
- On Chrome for Android, see if you use Wi-Fi or mobile data
It cannot
- Get exact speeds, since numbers are rounded
- See your Wi-Fi name or password
- Work in Safari or Firefox
- Ask permission first
How it differs between platforms: Chrome, Edge and Samsung Internet support it. Safari and Firefox do not.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 61 | 2017-09-05 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Not supported | Not available | Not listed | None |
| Safari | Not supported | Not available | Not listed | None |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Supported | 38 | 2014-10-08 | None |
| Samsung Internet | Supported | 3.0 | 2015-04-10 | None |
How a site asks for it
| API | navigator.connection.effectiveType, rtt, downlink, saveData; Save-Data and Downlink request headers |
| Browser compat keys | api.NetworkInformation |
| How access is granted | none |
| What the user sees | Not listed |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Not listed |
| How to take it back | Not listed |
| Inside an iframe | Not listed |
Typical flow
- Read navigator.connection
- Listen for change events
Data you get
What comes back: 4 fields
Shape: object
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
effectiveType | string | None | slow-2g, 2g, 3g, 4g | 4 buckets |
rtt | integer | ms | 0 to 3000 | 25 ms rounding |
downlink | float | Mbps | 0 to 10 | 0.025 steps rounded |
Technical limits
- Chromium only (Chrome, Edge, Opera, Samsung)
- Estimates, not measurements of the real line
The story
What it is
A page can see your estimated connection type and speed, and whether Data Saver is on.
For you
You get no prompt. A site may quietly send smaller images or lower quality video when you are on a slow connection or have Data Saver on. Pages feel faster and use less data.
For makers
Makers use it to adapt quality to the network. Streaming and real time apps pick a safe level to avoid buffering. It is also a small signal for device ID and location hints.
Where you see it
| Type | Example | Apps |
|---|---|---|
| video | A streaming site starts at lower video quality on a slow connection, then raises it. | YouTube, Netflix |
| games | A cloud gaming page like Xbox Cloud Gaming or GeForce NOW picks stream quality based on your connection. | Xbox Cloud Gaming, GeForce NOW |
| video | A video call site lowers video size when your network gets weak, to keep the voice clear. | Google Meet, Zoom web client |
| shopping | A shop sends smaller product photos to people on Save Data or slow mobile. | None named |
| news | A news site skips autoplay video for people who turned on Data Saver. | None named |
| ads | An ad network lowers ad size on slow networks to avoid slowing the page. | None named |
| security | A fraud tool uses connection type as a small clue that does not match the claimed device. | None named |
Risks
- Chromium only
- Adds to a device ID
What the platform says
- MDN: Network Information API. Lets a page see the type of connection and adjust, such as sending less data on a slow one.
- web.dev: Save-Data. Google describes a hint that tells a site you want to use less data, so it can send lighter pages.
Good uses and abuse
Legitimate uses
- Adaptive media and prefetch
Known abuse
- Adds up to 2 bits of network class; mobile vs wifi
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 2 | Rough identifying entropy, when known |
History
- 2020-01, Chrome: Values rounded and capped to reduce fingerprinting
Related capabilities
Related
- Client Hints (Accept-CH, Critical-CH). Can ask your browser for extra device details such as model, OS version and screen
Sources
How well checked: Based on official documentation.