views:

471

answers:

1

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.

+2  A: 

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.

psychotik
this is definitely the case, i've been on wireless thats way slower than a good HSDPA connection
seengee
good idea - never really occured to me to think of it like that! Thanks - good idea :)
Jordan