基于网络的方法来确定iPhone是否通过3G或Wifi连接 [英] Web based method to determine if an iPhone is connected via 3G or Wifi

查看:116
本文介绍了基于网络的方法来确定iPhone是否通过3G或Wifi连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个允许用户查看视频播客的web应用程序。目前,用户可以根据他们是否通过3G或Wifi连接,选择是否喜欢低带宽或高带宽视频。



有什么方法可以让webapp确定这个?我知道有一种方法可以使用设备的IP来确定它是否在诸如AT& T之类的网络上,但是要找出它们以及其他全球运营商的IP范围是不可行的。

有什么方法可以确定iPhone是通过3G或Wifi连接的吗?我希望iPhone可以使用稍微不同的浏览器代理字符串或类似的东西。

解决方案

你可能不关心3G和WiFi,就像你带宽/往返时间一样。

不知您是否可以通过不检测3G vs 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.

这篇关于基于网络的方法来确定iPhone是否通过3G或Wifi连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆