When web browser downloads web pages, it exchanges a certain amount of identification data with the server of the target resource. This is necessary to create an Internet connection in general and get some extra information from the browser as well. In most cases, this extra data is used to display websites correctly on the client device according to its specifications.
To calculate device parameters, the website must get accurate information about device type and its software. This data is passed to the website inside an HTTP request with a parameter called User-Agent. Let's take a deeper look at what it is, why it should be changed, and how to do it in different browsers.More about User-Agent
More about User-Agent
First of all, you need to keep in mind that the concept of user agent can refer to different things. In some cases, this term is used to refer to user software designed to transmit data over a network. According to Wikipedia, User Agent usually combines programs that establish connections to websites: web browsers, web crawlers, and other related stuff.
However, in our case, User-Agent refers to a slightly different area. When web browser sends an HTTP request to a website, it passes necessary information in the headers for establishing connection. One of these headers is called User-Agent, and this is what the article is going to be about. Information about type and version of the web browser, the operating system, and the language installed in the system is transmitted to the server via this User-Agent header.
The table below shows examples of header content for different browsers and operating systems.
Web browser and OS
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36
Mozilla/5.0 (Android 9; Mobile; rv:67.0.3) Gecko/67.0.3 Firefox/67.0.3
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.28 Safari/537.36 OPR/61.0.3298.6 (Edition developer)
Mozilla/5.0 (iPad; CPU OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Tablet/15E148 Safari/604.1
User-Agent plays a big role for the correct operation of most web applications. First of all, User-Agent affects web page content view. The most common example would be loading a website in the language installed on the user's device. In this case, the user does not need to choose website language manually. Sure, there are other uses of User-Agent.
Currently, a wide variety of browsers are being actively developed and released but not all of them are equally popular. This has led to the fact that developers adapt the entire functionality of their websites to a couple of the most common browsers nowadays. And in order for the content to be displayed correctly on other devices certain features can be limited. In this case, User-Agent works as an identifier.
User-Agent is also used in mobile development, quite often smartphone models have very different characteristics: screen resolutions, browser versions, etc. Which forces to use several different page display formats for different users.
Why change User-Agent anyway?
In some cases, User-Agent spoofing is necessary to perform certain tasks or ensure the operation of technical processes on the network. All these cases can be divided into several categories:
- Ensuring that the browser works correctly with all web pages
- Testing web applications on different browsers
- Increasing user anonymity on the Internet
- Protection from getting banned in multi-accounting
Since less popular browsers may receive incomplete content or no content at all, a common measure is User-Agent faking.
Increasing anonymity by hiding the real User-Agent is useful when there is a need to hide the fact of using multiple accounts from a web resource. Because User-Agent and some other features can be easily identified and compromised.
Below, we'll try to manually configure User-Agent in Google Chrome and Opera.
Faking User-Agent in Google Chrome
It's very simple to change User-Agent in Google Chrome. No extra software or long configuration trips are required. All you need to do is to follow these simple steps:
- Open the Developer Tools window
There are several ways to do this: Press Ctrl+Shift+I, press F12, or select More tools, then Developer tools from the settings menu.
After that the developer window pops up.
- Uncheck the Select automatically item in the User agent section
The User agent section is located in the Network conditions tab in the additional tools section at the bottom of the development window. If the Network conditions tab is not present in the window by default, you need to open the more tools menu (three dots to the left of the Console tab).
- Select the desired browser and OS
There are other ways to replace the User-Agent in Google Chrome. The described method is the simplest, fastest, and most intuitive, and is therefore recommended as the main one.
Changing the user agent in Opera
Replacing User-Agent in the Opera browser of the latest versions is a little more complicated because now you need to install a special extension to do this. Several similar extensions have been developed for Opera. For example, in this article, we use the User-Agent Switcher and Manager extension.
User-Agent Switcher and Manager installation is similar to installing any other browser extension, so it will no be explained thoroughly. After successful installation, an icon will appear in the upper-right corner of the browser. Clicking on this icon opens the User-Agent settings menu.
The process of configuring the User-Agent is fairly simple. It can be divided into three stages:
- Selecting a combination of browser and operating system
- Selecting the appropriate User-Agent option from the list of available versions of the selected browser and OS
- And changing the User-Agent in the browser (Apply button) or in a separate window (Window button)
After completing these three steps, you can make sure that you successfully changed the user agent in the User-Agent String form or by pressing the Test key. When you click the Test button, the what is my User Agent window opens automatically in the browser.
After making sure that the User-Agent substitution was successful, you can start your anonymous journey on the Internet. It is also worth mentioning that various websites can detect your device or its operating system using fingerprintOS, which is much more difficult to fake, so for this purpose it is best to use a proxy server.