Archive for August, 2009

Change Firefox user agent to mobile devices’

Often you need view your mobile web development on mobile devices. Wouldn’t it be better to have Firefox, web developer, firebug and etc to help you?
You can change your desktop Firefox user agent string to make a mobile web site thinks you are view it from a mobile device.
Here’s how to do it.

  • Type about:config in Firefox address bar. And read the scary warning and proceed
  • Right click on the settings and select New -> String.
  • Enter the preference name: general.useragent.override, enter string value: BlackBerry9000/4.6.0.266 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/120

Then you’ve done.

In above example, “BlackBerry9000/4.6.0.266 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/120″ is Blackberry Bold user agent.

Common user agents
iPhone user agent:
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
Windows mobile 6 user agent:
Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile M.N)

In case you want to get full desktop power back, just select the settings you just added, and select “Reset”

  • Share/Save/Bookmark