ReadonlydownlinkApproximate downlink speed in megabits per second. Rounded to the nearest 25 kbps, based on recent throughput over active connections. May be undefined if no estimate is available.
ReadonlyeffectiveA string describing the general quality of the connection (for example, "4g", "3g"). Determined from both downlink and latency estimates.
ReadonlyrttEstimated round-trip latency of the current connection in milliseconds, rounded to the nearest multiple of 25 ms.
ReadonlysaveIndicates whether the user has requested reduced data usage in the user agent’s settings.
Optional ReadonlytypeType of underlying network connection in use (for example, "wifi", "cellular"). May be omitted if unknown.
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsThe removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
Optionaloptions: boolean | EventListenerOptions
Provides information about the system’s current network connection, such as estimated bandwidth, round-trip time, and connection type. Also exposes events for monitoring changes to the network state.
See
https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation