Type: JavaScript Property (navigator.connection.rtt)
Data Source: Browser's Network Information API
When Available: Chromium-based browsers (Chrome, Edge, Opera, Brave), not supported in Firefox or Safari
Return Type: Number (milliseconds)
The navigator.connection.rtt property returns an estimate of the round-trip time (RTT) in milliseconds. RTT represents the time it takes for a data packet to travel from the browser to a server and back. This is also commonly known as "latency" or "ping time."
Historical Context:
What is Round Trip Time?
Key Characteristics:
Typical Value Ranges:
| RTT (ms) | Quality | Connection Types | User Experience |
|---|---|---|---|
| 0-50 | Excellent | Local network, nearby servers, fiber | Instantaneous response, perfect for gaming and video calls |
| 50-100 | Very Good | Fast cable/fiber, good 4G/5G | Barely noticeable delay, great for all applications |
| 100-200 | Good | Standard broadband, 4G LTE | Slight delay noticeable in interactive apps |
| 200-400 | Fair | Slow broadband, 3G, distant servers | Noticeable lag, acceptable for browsing |
| 400-1000 | Poor | Slow 3G, 2G, satellite, heavily congested | Significant lag, frustrating for interactive use |
| 1000+ | Very Poor | 2G, satellite, extreme congestion | Severe lag, barely usable |
Real-World Examples:
Factors Affecting RTT:
Legitimate Uses:
Application-Specific Examples:
Combined with Other Metrics:
effectiveType to determine overall connection qualityBrowser Support:
| Browser | Support | Notes |
|---|---|---|
| Chrome | Yes (v61+) | Full support, reliable measurements |
| Edge | Yes (v79+) | Full support on Chromium-based Edge |
| Opera | Yes (v48+) | Full support |
| Brave | Yes | Supported, may be limited in strict modes |
| Firefox | No | Not implemented; navigator.connection undefined |
| Safari | No | Not implemented; privacy concerns |
| Mobile Chrome | Yes | Works on Android, readings more variable |
| Mobile Safari | No | Not supported on iOS |
Measurement Methodology:
Why Limited Support?:
Fallback Strategies:
if (navigator.connection?.rtt)effectiveType as alternative quality indicatorTracking Risk: LOW
Privacy Concerns:
Why Low Risk:
Entropy Analysis:
Comparison to Other Metrics:
How to Control RTT Reporting:
Browser Selection:
Privacy Extensions:
navigator.connectionTesting Your RTT:
navigator.connection?.rttsetInterval(() => console.log(navigator.connection?.rtt), 5000)VPN and Proxies:
Limitations of Control:
Privacy Best Practices:
For Developers:
if (navigator.connection?.rtt)Comprehensive documentation for the RTT property
Complete overview of the Network Information API
Official W3C specification for the API
Technical explanation of RTT in networking
Using RTT and other network metrics for adaptive content
Browser compatibility information for Network Information API
Comprehensive guide to understanding network latency