How can I check user internet speed
1 Like
you could keep a web viewer for fast.com or speedtest.net.
How can I get that data like
If net speed is
Less then 25/30 Mbps you can’t access the app
@namitnagar try to use internet Speed API
Dear @namitnagar
You can write a small JavaScript to show the connection type (Wifi, 4G, 5G, …) and also to check the download speed or RTT and decide what you do.
See this example from W3S:
var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
var conType = connection.type;
console.log("Your connection type: " + conType);
Returns the type of connection a device is using to communicate with the network. It will be one of the following values:
- bluetooth
- cellular
- ethernet
- none
- wifi
- wimax
- other
- unknown
You can also use navigator.connection.effectiveType
to get
- slow-2g
- 2g
- 3g
- 4g
Hope this helps
1 Like