« All My Funds - Low-cost Subscription-based Superannuation | Main | ActiveRecord and programmatically working with attributes. »

iPhone and iPod Touch User-Agent HTTP Header

Monday, October 1, 2007 at 06:58PM

I have had the opportunity to recently get my hands on an iPod Touch specifically to do web-development to work with it's fully-featured Safari web browser.

These applications need specialised formatting for these devices (both have the same resolution screens). The easiest way to identify these phones is using the User-Agent header passed in a HTTP GET/POST request.

The iPod Touch's (firmware version 1.1.1) User-Agent field (found by writing a simple PHP page to return the $_SERVER['HTTP_USER_AGENT']) is:

Mozilla/5.0 (iPod; U; CPU like Mac OS X; en)
AppleWebKit/420.1 (KHTML, like Gecko)
Version/3.0 (Mobile/3A110a Safari/419.3

The iPhone's User-Agent field (found at note19.com's blog) is:

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)
AppleWebKit/420+ (KHTML, like Gecko)
Version/3.0 Mobile/1C28 Safari/419.3 

 The above User-Agent fields have been split over multiple lines to aid legibility.

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.