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.

Comments

1 | Reallynotnick said on October 29, 2006 12:10 AM

Really interesting stuff thanks for the info and link. To bad Mapleglobal.com can still know I am using FireFox and not IE even if I change the user agent with the extension. Oh well.

Post a reply to this comment
2 | Kuahine Author Profile Page said on October 29, 2006 10:54 PM

I'm running your G5-optimized Firefox 2.0. One of the (rather anal) sites I can't get into is http://idisk.mac.com. It says I must use either Safari or Firefox to enter. Sigh.

I tried adding the general.useragent.override string and its corresponding string value, as you recommended, but subsequently endured several crashes, a few mysterious disappearances of the entire string from my about:config file, and at least one disappearance of only the string value. To make matters worse, my "BonEcho" Tools menu kept going all weird on me (no "Add-ons" entry, for one).

Okay. So I removed the override string from the config file and all symptoms disappeared, but of course I still couldn't enter idisk.mac.com.

However, I just changed the value of the config's existing general.user.extra.firefox string (from "BonEcho/2.0" to "Firefox/2.0"), and so far, so good: I can get into idisk.imac.com; whatsmyuseragent.com indicates Firefox/2.0 instead of BonEcho (jeez, I hate that ugly word); and the browser isn't noticeably freaking out.

I'll let you know if anything changes....

Oh, and as always, thanks for the optimized version, Neil. Je t'aime beaucoup aussi.

Post a reply to this comment
3 | spiral said on November 2, 2006 7:50 AM

Hmmm, just a suggestion...

I really like the job you do with these builds... As it's impossible to use Mozilla Firefox official name & logo... Why don't you use IceWeasel name and logo, instead of all this DeerPark/BonEcho stuff ?

Post a reply to this comment
4 | lkt said on November 9, 2006 4:38 AM

My i-banking site works fine with Firefox 2.0 (Intel Mac OS10.4.8), but not with BonEcho. It is a Windows site (the bank unashamedly insisted that they will not consider supporting Macs) which somehow started working when I bought the Intel iMac with the new OS.

Otherwise BonEcho works fine. It seems slightly snappier.

Just to let you know.

Post a reply to this comment
5 | Firas said on November 12, 2006 4:55 AM

This solves the problems I've been having with several sites such as Xbox.com and mail.yahoo.com (Beta). Thanks!

Post a reply to this comment
6 | kb said on November 18, 2006 11:02 AM

Another way to accomplish the same thing without overriding the entire useragent is to change the built-in pref general.useragent.extra.firefox, which in your optimized builds ships set to "BonEcho/2.0", to "Firefox/2.0". The rest of the autogenerated useragent string is fine.

Post a reply to this comment
7 | Thomas said on December 10, 2006 10:29 AM

Thanks, I was just wondering how to do this.

Post a reply to this comment
8 | buggedme Author Profile Page said on August 10, 2008 10:34 AM

Found another good tutorial at http://dotdoh.com/?p=191 , with step by step guides on how to change the useragent via a plugin

Post a reply to this comment
9 | oleg said on September 16, 2008 11:49 AM

How to save the general.useragent.override for future sessions?

Post a reply to this comment
10 | Bitman said on October 20, 2008 6:28 AM

Try http://id.furud.net/

There you will find a database of user agent strings.

Post a reply to this comment

Post a comment

Remember Me?

Comments Preview:

Comments:

(Textile text-formatting is enabled - HTML will be stripped out):


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