Perl programmer for hire: download my resume (PDF).
John Bokma MexIT
freelance Perl programmer

Changing User Agent in Firefox

Saturday, April 24, 2004 | 10 comments

Someone visited both Els her web site and mine with a funny User Agent string. I used Google to find out how to change this string within Mozilla Firefox and found the answer on a Mac OS X forum. The posting described a method of changing the string in Firebird, the old name of FireFox. The name Firebird was dropped by Mozilla, because there is also a database with this name.

How to edit the User Agent string

To change the User Agent string, just enter about:config as an address in the address bar of FireFox, the location where you normally enter a URL (link). I recommend to preserve the original value, which you can get when you enter just about: in the address bar.

Now press the right mouse button to get the context menu and select "String" from the menu entry "New". Enter the preference name "general.useragent.override", without the quotes. Next, enter the new User Agent value you want Mozilla Firefox to use. I added my name and a link to my web site to the original value. You can also pick one from the list of User Agent strings. Check the new value by entering about: in the address bar.

Detecting Googlebot cloaking

The User Agent string "Googlebot/2.1 (+http://www.googlebot.com/bot.html)", without the quotes can sometimes be used to discover sites that use a simple technique to feed Google's spider ("Googlebot") optimized web pages in order to obtain a higher position (spamdexing). This technique is a form of cloaking that is in most cases against the terms of services of Google. If you discover such a web site, and the page can be found with Google, report the offending site to Google for a better search experience.

Watch the Screencast

Adrian 'IronGeek' Crenshaw used the information on this blog entry to create an excellent Flash movie tutorial as part of his Hacking Illustrated Series: Setting Firefox's User Agent To Googlebot.

User Agent related

Also today

Please post a comment | read 10 comments, latest by Chris | RSS feed