Creating custom User Agents

So I use Firefox as my primary browser on Ubuntu and what really irritates me is when I come across a website which renders completely differently than when using other browsers.

You know the sort, the one’s which render fine on Edge, Chrome and Safari and then change completely to a “This site is designed for Chrome, please download it here.”

They do this by using the User Agent string which the browser sends to the server.

A User Agent string looks like the following:

Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0

Which tells the website the browser, version, build, platform and other information as to what is accessing their site.

You can run analysis on this using 3rd party sites such as useragentstring.com

Obtaining a User Agent

A list of User Agents can be found on several websites including:

and others.

Copy the User Agent String you want from here into your clipboard / notepad. We will need this later.

Amending your Uset Agent

To get around this you can change the User Agent within Firefox (and other browsers).

  • Press F12 to open the Dev Tools
  • Select the Responsive Design Mode (CTRL + SHIFT + M)
  • At the top, the first drop down is the User Agent - select this and click on Edit List
  • Click on the Add Custom Device from the top
  • Give it a Name, Screen resolution and Use Agent String by pasting it from clipboard or from the notepad you created earlier.

Using the User Agent string

Now if you select the user agent you just created from the drop down where you selected Edit List, it will present the User Agent string to the website.