How to change the user agent in Firefox

It seems like BonEcho and unofficial Firefox builds do not ship with the same user agent as the official Firefox release, which seems completely ludicrous. Normally this shouldn’t cause much of an issue, but with some (rather anal) sites that sniff for the exact Firefox 2.0 user agent you might run into issues if you’re running one of my optimized builds.

So let’s look at fixing this.

  1. Launch BonEcho / Firefox and enter about:config into the address bar.
  2. You’ll get a “page” that consists of row upon row of preferences. Right-click / control + click anywhere on the page. Select New and then from the sub-menu select String.
  3. A sheet appears asking for a New string value. Enter general.useragent.override and click OK or hit return.
  4. Another sheet appears asking for you to Enter string value. This is where you enter the user agent BonEcho / Firefox should use to identify itself to servers.

    To set this to the official Firefox user agent for Intel-based macs enter Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0 For PPC-based macs enter Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0. Hit OK or press enter.

That’s it! Now BonEcho / Firefox should identify itself as Firefox 2.0 and sites that are overly picky about the user agent should work as expected. If you want to test this you can point your newly masked browser to the aptly named whatsmyuseragent.com.

More bumf on user agents

For on-the-fly user agent switching check out Chris Pederick’s User Agent Switcher extension. Everyone’s favourite neighbourhood encyclopedia has scads of information on user agents including a number of examples you can use if you want to masquerade as a different browser.

Okay, that’s enough Firefox on this weblog to last at least a couple of weeks. Back to your regularly scheduled meandering and pointless babbling.


ISSN 1499-7894
Recent Posts
SEARCH
Contact Archives Web Love Writing Photos FAQs Home