Skip to content

April 30, 2026 · 7 min read

What Is My Network Type? How Browsers Detect Wi-Fi vs Cellular

How the Network Information API exposes connection type, effective speed class, and estimated bandwidth — and why Firefox and Safari don't support it.

Your browser knows more about your connection than you might expect — but only if you are using the right browser, and only up to a point.

The Network Information API (navigator.connection) is a browser feature that exposes four pieces of information about your current network: the connection type (Wi-Fi, cellular, ethernet), the effective speed class (4G, 3G, 2G), an estimated bandwidth, and whether Data Saver mode is active. It is available in Chrome, Edge, and other Chromium-based browsers, including Android WebView — but not in Firefox or Safari.

What the API actually exposes

The navigator.connection object has five key properties:

PropertyTypeExampleWhat it means
typestring"wifi"Physical medium: wifi, cellular, ethernet, bluetooth, none, unknown
effectiveTypestring"4g"Performance tier based on observed RTT and throughput
downlinknumber10Estimated bandwidth in Mbps (rounded)
rttnumber50Estimated round-trip time in ms (rounded)
saveDatabooleanfalseWhether reduced-data mode is active

The values update in real time. The connection object fires a change event when you switch networks — toggling airplane mode, connecting to a new Wi-Fi network, or roaming between cellular towers all trigger it.

type vs effectiveType — what is the difference?

These two fields answer different questions.

type describes the physical medium — the radio or wire you are actually using. On Android Chrome it reliably returns "wifi" or "cellular". On desktop Chrome it almost always returns "unknown" because the OS API needed to distinguish ethernet from Wi-Fi is not consistently accessible from within the browser sandbox.

effectiveType describes the performance you are experiencing, regardless of medium. The browser classifies it by measuring recent download speed and round-trip time against four thresholds:

  • 4g — fast; typical for good broadband or strong cellular
  • 3g — medium; usable for most browsing but slow for heavy pages
  • 2g — slow; noticeable delays loading images and scripts
  • slow-2g — very slow; effectively offline for most modern web content

A fast Wi-Fi connection on a congested hotspot may report type: "wifi" but effectiveType: "2g" — because what matters for adaptive content is how the connection is performing, not what it is physically called.

Why Firefox and Safari don't support it

The Network Information API has been in a draft specification for over a decade but remains unshipped in Firefox and Safari. Both vendors cite fingerprinting risk as the primary concern: combining connection type, downlink, and RTT with other signals narrows down a user's identity. Mozilla has kept the spec in a "harmful" category in their standards position tracker. Apple has not publicly committed to implementing it.

Chromium shipped it primarily for mobile web use cases — adaptive image and video delivery on Android where the cellular vs Wi-Fi distinction has real cost implications for users on metered plans.

What developers use it for

Adaptive media delivery is the most common application. A video player that checks effectiveType before loading a playlist can serve a 360p stream on 2g and switch to 1080p on 4g without waiting for a rebuffer event to discover the connection is slow.

Data Saver awareness via saveData lets progressive web apps skip large background syncs and pre-fetches when a user has explicitly told their OS they want to conserve data. This is especially relevant on prepaid mobile plans in markets where data costs are high.

Debugging is a simpler use case: when a page loads slowly, checking effectiveType immediately tells you whether the issue is the connection quality or the server — no need to run a separate speed test first.

A note on the values being intentionally imprecise

The browser deliberately rounds downlink to one of a small set of values and caps rtt to 25 ms increments. This is a privacy protection against high-precision network fingerprinting. The values are approximate by design — close enough to make adaptive decisions, not precise enough to track you across sites.

If you need a real bandwidth figure, use a dedicated Internet Speed Test. If you need actual round-trip latency to a specific server, use a latency probe. The Network Information API is an optimization hint, not a measurement instrument.


You can see everything your browser currently exposes — connection type, effective speed class, estimated bandwidth, and Data Saver status — on the What Is My Network Type tool, which also updates live if your connection changes while the tab is open.