Changing User Agent Strings

An increasingly important web site requirement is to present different pages for mobile browsers. Although it’s possible to purchase a large number of mobile devices for testing purposes, some testing can be done in software only.

Typically, you’ll be detecting the kind of device accessing your site using the user agent string sent by the browser. So, you want to test that your site presents different pages based on the user string the browser sends.

Here are instructions for instructing Safari on Mac OS X to present various user agent strings. Unfortunately, there is a fixed set that doesn’t include Blackberry browser strings.

Firefox (across platforms) can be instructed to send various customizable user agent strings using the User Agent Switcher add-on.

Here is a list of user agent strings for various browsers, and here is a list of user agent strings for various mobile browsers.

Tags: Technical

Created at: 19 March 2009 10:03 AM