The User Agent, well the HTTP User Agent, is a string of data identifying the browser, browser version, the underlying Operating System and contains other miscellaneous information.

In Firefox, you can send a fake HTTP User Agent to the web server, that can be used in some cases. For example, when the site is designed to work only with a particular browser or when the site changes the layout depending on whether a desktop or mobile browser is used.

To change the User Agent in Firefox, enter about:config in the address bar and search for the preference name ‘general.useragent.override’. Next, edit the value to the User Agent string that you want Firefox to use.

Alternatively, you can install the User Agent Switcher Add-on for Firefox, if you do not want to meddle with the user peference settings directly. My personal recommendation is to use the Firefox Add-On.

To change the User Agent string from the User Agent Switcher Add-On, select ‘User Agent Switcher -> Options -> Options‘ from the Tools menu of Firefox. Select ‘User Agents‘ and click on ‘Add‘ to add a new User Agent definition.

An example of a typical User Agent string used by Firefox is shown below.

firefox user-agent

Below are some examples of the User Agent strings used by Internet Explorer, Opera and iPhone browsers respectively. Note that the strings may change depending on the browser version and the Operating System.

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)

Opera/9.25 (Windows NT 6.0; U; en)

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3B48b Safari/419.3

Ibrahim is a Software Engineer, Blogger and Mobile Telecom Network professional. A technology enthusiast with great interest in open source projects.