Network Information API
Estimated connection type, speed and latency, plus a data-saver flag.
In one line
Can see roughly how fast your connection is and whether you turned on data saving
Estimated connection type, speed and latency, plus a data-saver flag.
Lets a site pick light pages on slow links. effectiveType buckets: slow-2g, 2g, 3g, 4g. downlink rounds to 25 kbps steps (capped near 10 Mbps), rtt to 25 ms steps. Type (wifi or cellular) is Android only.
What it can and can't do
What the user does: Nothing. It happens when the page loads and while you stay on it
It can
- See a rough speed class such as 2G, 3G or 4G
- See rounded speed and delay figures
- See if data saver is on
- Tell Wi-Fi from cellular on Android only
It cannot
- See your exact speed, since figures are rounded to coarse steps
- Work in Firefox or Safari
- Tell Wi-Fi from cellular on a computer
- See your provider, name or location
How it differs between platforms: Only Chrome, Edge and Samsung Internet offer it. Wi-Fi versus cellular is shown on Android only.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 61 | 2017-09-05 | type since 38 on Android |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Not supported | Not available | Not listed | Android only, removed |
| Safari | Not supported | Not available | Not listed | Declined |
| 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, .downlink, .rtt, .saveData, .type, 'change' event |
| Browser compat keys | api.NetworkInformation.effectiveTypeapi.NetworkInformation.downlinkapi.NetworkInformation.rtt |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | read fresh on every page load; nothing stored |
| How to take it back | none needed (no grant) |
| Inside an iframe | Readable from cross-origin iframes too (same values) |
Typical flow
- Page script reads the value
- No prompt is shown
Data you get
Shape: object
How often: static per session
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
effectiveType | enum | None | slow-2g, 2g, 3g, 4g | from rtt and downlink thresholds |
downlink | float | Mbps | 0 to 10 | rounded to 25 kbps |
rtt | integer | ms | 0 to about 3000 | rounded to 25 ms |
saveData | boolean | None | true or false | Not listed |
type | enum | None | bluetooth, cellular, ethernet, wifi, wimax, none, other, unknown | Android Chromium |
Technical limits
- Chromium only
- Estimate from recent traffic, not a speed test
- Cannot read Wi-Fi name or signal
The story
What it is
A page can read your estimated connection type, speed and delay, and if data saver is on.
For you
You never see a prompt. Sites may load lighter pictures or skip auto video if your line is slow or you turned on data saver. You just see a faster page.
For makers
Makers use it to cut load time, save mobile data and keep users from leaving. It is also quietly counted in some fingerprints. Firefox and Safari do not offer it.
Where you see it
| Type | Example | Apps |
|---|---|---|
| video | A video site starts at 480p on a weak connection and moves up when speed improves. | YouTube |
| games | A browser game checks speed before loading its big level pack and offers a smaller pack on slow lines. | None named |
| shopping | A store shows tiny image placeholders first for shoppers with data saver on. | None named |
| news | A news site holds back auto play video on slow connections and metered data plans. | None named |
| productivity | A web editor such as Google Docs delays syncing big attachments until the connection is better. | Google Docs |
| analytics | A speed dashboard shows how page load changes by connection type across real visitors. | None named |
| ads | An ad script reads type, speed and delay as part of a device fingerprint. | None named |
Risks
- Adds to a fingerprint
- Chromium only
What the platform says
- MDN Web Docs: Network Information API. Lets pages adapt to the connection, such as sending less data on slow links or when data saver is on.
Good uses and abuse
Legitimate uses
- Adaptive loading
- Lite pages
Known abuse
- Network-class fingerprint
- Price discrimination by connection
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 2.5 | Rough identifying entropy, when known |
A real example: LinkedIn
Connection type, downlink, RTT collected. Read by the LinkedIn APFC fingerprint script (alleged by BrowserGate, partly confirmed by BleepingComputer).
History
- 2017-09, Chrome 61: effectiveType, rtt, downlink available
- 2019-01, Firefox: Not supported on desktop; Android support removed
Related capabilities
Related
- Network client hints (ECT, RTT, Downlink). Can see your rough connection speed and delay in each request, if it asks first
Sources
How well checked: Checked against real behavior.