Detection between iPad and iPad2 via jQuery / Javascript?

Is there a way to detect iPad and iPad2 through jquery / javascript? Or even PHP or some other way from a website?

+3
source share
4 answers

I have an iPad and iPad2 with the same version of iOS, and I don’t understand that it is currently possible to create the exact same user agent on both devices.

IPad

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

iPad2

Mozilla/5.0 (iPad; CPU OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3
+3
source

As you can see below, the only difference is that ipad: Mobile / 8F190 ipad2: Mobile / 8F191, so you can disable the user agent and look for the difference.

IPad User Agent String:

Mozilla/5.0 (iPad, U, CPU OS 4_3, Mac OS X, en-us) AppleWebKit/533.17.9 (KHTML, , Gecko) /5.0.2 Mobile/8F190 Safari/6533.18.5

iPad2:

Mozilla/5.0 (iPad, U, CPU OS 4_3, Mac OS X, en-us) AppleWebKit/533.17.9 (KHTML, , Gecko) /5.0.2 Mobile/8F191 Safari/6533.18.5

, , , , , , p...

+2

javascript (Mobile/9A405), , . , iPad, , .

1 - = /:

  • iPad 1 - Mozilla/5.0 (iPad; 5_0_1, , Mac OS X) AppleWebKit/534.46 (KHTML, , Gecko) /5.1 /9A405 Safari/7534.48: 3 p >

  • iPad 2 - Mozilla/5.0 (iPad, OS 5_1, Mac OS X) AppleWebKit/534.46 (KHTML, , Gecko) /5.1 /9B176 Safari/7534.48: 3 p >

2 - = Mobile/string:

  • iPad 1 - Mozilla/5.0 (iPad, OS 5_0_1, Mac OS X) AppleWebKit/534.46 (KHTML, , Gecko) /5.1 /9A405 Safari/7534.48.3 p >

  • iPad 2 - Mozilla/5.0 (iPad, OS 5_0_1, Mac OS X) AppleWebKit/534.46 (KHTML, , Gecko) /5.1 /9A405 Safari/7534.48.3 p >

+2

, , , . , , ipad , ipad2, , .

, , - , , , , ipad.

0

All Articles