iPad version detection in JavaScript

前端 未结 9 788
耶瑟儿~
耶瑟儿~ 2020-12-06 11:12

Is it possible to check for the iPad version (1 or 2) in a web application? As the user agent looks identical (see http://www.webtrends.com/Support/KnowledgeBase/SolutionDet

9条回答
  •  难免孤独
    2020-12-06 11:42

    looks like the iPad 2 can have the same Mobile/9B176 code than the New iPad. Maybe it's because of an update of iOS?

    Here is my full iPad2 user-agent string:

    Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3

    I can't check on an updated iPad 3. Could someone please tell me if there is any difference?

    (by the way, if you just want to know if the user has a low-res or a high-res iPad, you can use this trick: https://stackoverflow.com/a/10142357/974563 )

提交回复
热议问题