Detect the specific iPhone/iPod touch model in Javascript
I am developing a website for Apple i* devices which uses HTML5 webkit features like transitions but I want to disable some of the fancy stuff for older/slower iPhone models like iPhone < 3GS and iPod touch < 3rd Gen because on those devices the transitions are too slow.
Is there a way to detect the exact model (not just the OS/User Agent) within Javascript?
这似乎工作,至少要确定2至3克和3克...不知道如何确定它是否是4克尚未...
var percentmobile_t = new Date().getTime();
var percentmobile_s = 0;
while(new Date().getTime() - percentmobile_t < 20)
{
Math.random();
percentmobile_s++;
}
_is2_or_3g = (percentmobile_s < 1000);
链接地址: http://www.djcxy.com/p/1432.html