how to detect the mobile connection is 2G/3G/WIFI using javascript

前端 未结 2 1889
一生所求
一生所求 2020-12-19 04:48

i have a similar requirement as in link below but i have to handle it by using JavaScript. where i have to detect whether the mobile internet connection is 2g/3g or it is WI

2条回答
  •  醉酒成梦
    2020-12-19 05:28

    I wrote a small utility to do this. You can try it here http://ashanbh.github.io/detectClientSpeed/example2.html and fork it on github: https://github.com/ashanbh/detectClientSpeed

    Usage:

    
    
    

提交回复
热议问题