iPad user agent identification for webapps ?

iempty

Member
Feb 11, 2010
17
0
0
Visit site
Hello !

I'm wondering what is (if known) the iPad HTTP user agent for web app or internet websites to recognize it ?

For iPhone and iPod touch, in PHP, I used this code :
Code:
if( strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod') ){
      return TRUE;
    }

What about the iPad ?
I think it will be just 'iPad', but somebody can confirm this ??
 

iempty

Member
Feb 11, 2010
17
0
0
Visit site
Oh... and I forgot to tell you :

I need this info because I made a webapp called "iEmpty" (tap "iEmpty iPhone" on google should work) that allows to customize iPhone and iPod Touch with empty spaces on the springboard (like iBlank but without jailbreak needed)

I'm sure it will also work with the new iPad, but I first need to detect it in my code to allow the functionnality for this device.

See you !
 

MobiCoder

Member
Apr 20, 2010
14
0
0
Visit site
I did a google search but from what I found it as simple as swapping the "if iPhone" for "if iPad". So I don't want to say confirmed but from what I found yes.

Hope this helps,
Mobi


Oh Quick Question: What are you using for user interaction for the iPad? Using a Javascript Library?
 
Last edited:

9ki

Member
Apr 22, 2010
16
0
0
www.9000ipadwallpapers.info
Here's an actual iPad User-Agent, I just dug it out of some server logs.

Code:
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10

Looks like you should be fine just checking for "iPad".
 

Latest posts

Trending Posts

Members online

Forum statistics

Threads
260,379
Messages
1,766,633
Members
441,240
Latest member
williams77