How to: Fake the iPhone User Agent

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
iPhone User Agent setttings

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:

Facebook on the iPhone

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.

iPhone testing with user agent



Similar Posts

2 Comment(s)

  1. 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/

  2. 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!

6 Trackback(s)

  1. Mar 3, 2008: “View Source” for Your iPhone :: borloz.com
  2. Mar 7, 2008:   iPlayer on iPhone, Bravo!  by  Oak Innovations Blog
  3. Mar 9, 2008: How to download unprotected BBC iPlayer content to your Mac. | MacHacks.TV
  4. Mar 28, 2008: Alex P. Gates » Blog Archive » Downloading from Muxtape
  5. May 1, 2008: Get Free Wi-Fi Access on Your Laptop at Starbucks, Barnes and Noble [Free Wi-Fi] · TechBlogger
  6. May 2, 2008: Hack to Get Free Wifi from Starbucks and ATT Hotspots -- See One, Do One, Teach One
Comment guidelines:

Support for articles is not available due to the volume of help requests we get. Anything resembling Spam, or comments that offer little value, will be promptly deleted.

Post a Comment