How to: Fake the iPhone User Agent
Posted by Andy Atkinson on 10/3/07 in Apple, Mobile, OS X, Tutorials
OS X users can install iPhoney or another desktop application to test iPhone compatible websites and applications. The application sets the user agent so the iPhone-specific version of a site or application can be displayed instead of the traditional theme. Web-based versions TestiPhone and iPhone Tester do not support zooming as of this writing, and neither will fake the iPhone user agent.
Fortunately Firefox extension User Agent Switcher lets Firefox users change and add new User Agents. I was able to add the iPhone user agent settings using details from TestiPhone.
1) Install User Agent Switcher Firefox extension
2) Add a new User Agent and supply the following information (Tools > User Agent Switcher > Options)
- Description: iPhone
- User Agent: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)
- App Name: AppleWebKit/420+ (KHTML, like Gecko)
- App Version: Version/3.0
- Platform: Mobile/1A542a Safari/419.3
3) Set the User Agent to your newly created iPhone option
4) Navigate to a website with an iPhone version and enjoy.
Here are some iPhone-compatible places to get you started:
- SmugMug - early implementer, nice slide effect (looks borrowed from iUI from Joe Hewitt), details here
- Facebook - another attractive implementation, details here from Joe Hewitt
- Media Temple (our web host) Account Center for iPhone (doesn’t work with this method)
- Meebo IM (and Mundu)
- Google Calendar for mobile devices
- Google AJAX Search
- Java developer with Google technology? GWT iPhone example
- Wordpress-based sites with the iWPhone plug-in installed
Now that the user agent can be easily toggled between iPhone and default, use a web-based testing site like TestiPhone to flip back and forth between the normal and iPhone-optimized version.
permalink | trackback url |
Subscribe in a reader
Similar Posts
- Sync iPhone Calendar with Google Calendar on Windows for free
- Touchpad for iPhone and iPod Touch
- Android Introduction and First Impressions
- Hulu.com: TV on the web
- Camino Browser
Yann | Oct 27, 2007 | Reply
There is TypePad version for the iphone (http://i.typepad.com) and one for Movable Type too:
http://plugins.movabletype.org/imt/
Randal L. Schwartz | May 1, 2008 | Reply
You can also “defaults write com.apple.Safari IncludeDebugMenu 1″ at the command line in OSX, then stop and restart Safari. This will reveal the “debug” menu, and one of the options is “User Agent -> iPhone”, which looks like it has all the right values. Can’t wait to try this!