From what I gather, the iPad is using iPhone OS, but with a different screen resolution from the iPhone and iPod touch. So many sites may have to change their user agent detection to adapt to the iPad.
So, can anyone with access to the iPad or the iPad SDK give us the user-agent string?
From the simulator, in iPad mode:
and in iPhone mode:
I don't know how reliable the simulator is, but it seems you can't detect whether the device is iPad just from the user-agent string.(Note: I'm on Snow Leopard which the User Agent string for Safari is
)
Mine says:
For iPad Only
From a real device:
Mozilla/5.0 (iPad; U; CPU OS 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
It seems to be general consensus that every mobile apple device, iphone, ipad, or ipod uses a user agent that contains both 'Mobile' and 'Safari'.
However, using the latest SDK (4.0.1) and reading the user agent on my rails server (using
request.env["HTTP_USER_AGENT"]
), we never get the 'Safari' part.No matter whether the request is being made from the simulator or a real device, debug or release, it always looks something like this:
Just no 'Safari'. :-( So we have to use the 'iPhone' part to be sure. That is something apple does not recommend doing.
It's worth noting that when running in web-app mode (using the
apple-mobile-web-app-capable
meta tag) the user agent changes from:to: