Is there a way to detect the type of network connection using javascript?
I would like to know if there is a way to check if the user is connected from 2G, 3G, 4G or WiFi using javascript. As far as I know, Mozilla provides a Network Information API that helps detect the general type of connection, such as "wifi", "cell", etc.
+3
Prasad
source
to share
1 answer
This is the wrong approach to expose your web to javascript. Anyway, for your better understanding, please follow the link below.
How to check the connection type (WiFi / LAN / WWAN) using HTML5 / JavaScript?
And there is one that can help but only supports mozilla and for information you can visit the link below.
https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API
+1
Sumit
source
to share