简体   繁体   中英

Web based method to determine if an iPhone is connected via 3G or Wifi

I'm in the process of building a webapp that allows users to view a video podcast. At present, the user can select whether they would like low or high bandwidth videos depending on whether they are connected via 3G or Wifi.

Is there any way that a webapp could determine this? I know of one way that could use the IP of the device to determine if it's on a network such as AT&T but to find out what their, and every other worldwide carrier's IP range, is something that just isn't feasible.

Is there a way PHP, Javascript - anything - could determine if the iPhone is connected via 3G or Wifi? I was hoping that the iPhone may use a slightly different browser agent string or something similar.

You probably don't care about 3G vs WiFi as much as you do about bandwidth/roundtrip time.

I wonder if you can achieve this by not detecting 3G vs WiFi but by computing round-trip time using a browser script and using that to determine the fidelity of the user experience.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM