AdsPower
AdsPower

Breaking Down What Is A User Agent: UA Components & How To Look It Up

By AdsPower
624 Views

If you are a web scraping expert or simply someone who’s concerned about their online privacy, you must have come across the term ‘User Agent’ plenty of times. You must have heard that the User Agent string is one of the elements used for your digital profiling, and you must hide or fake it through XYZ means.

But no one bothers to tell you what is a user agent and how to look it up. Don’t worry because we are here to give you a complete rundown of user agent.

So let’s dig deeper and find out what is a user agent, what is it made of, and how you can find your browser’s UA string.

Understanding What Is A User Agent

When browsers send a request to a website server, they attach an HTTP useragent header along with it. This header is composed of information about the browser, device, and operating system, among other technical details.

This information inside the header is called the user agent string, and web servers use it to authenticate the browser’s request and display the website version suitable for the user’s device.

So, in essence, what does a user agent do? It simply identifies the browser and its platform to the server to provide a better experience to the end user.

The remote web server has a set of website versions available for different environments. It checks the received useragent header and figures out what environment it is coming from. Is it a desktop user agent, an iOS user agent, or an Android user agent?

For instance, if the website detects an Android user agent, the Android version of the webpage is returned compatible with the user’s device.

To answer what is a user agent briefly, it is a string that acts on your behalf when accessing websites or internet services. The string includes information about the software as well as the device and is used by websites to improve your experience on their site.

However, user agents are also one of the many attributes used for browser fingerprinting. To combat this, Chrome launched its own UA-CH where UA stands for user agent and CH is short for client hints.

You can also avoid browser fingerprinting by using the AdsPower anti-detect browser that lets you make a random user agent and customize the timezone, WebRTC, Location, and language among other parameters used in Browser Fingerprinting.

Meanwhile, let's stick to our topic and further decode the user agent string.

Components Of A User Agent

Ever noticed that webpages display subtle design variations when accessed from an Apple device as opposed to others? This is because the useragent header received by the website from Apple devices is different from other devices.

But what are the contents based on which the webservers decide which website version to show?

Let’s look at it through a random user agent.

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36


What are all those terms and numbers? Let’s understand them one at a time.

Breaking Down What Is A User Agent: UA Components & How To Look It Up

Legacy Token

The most common user agents have ‘Mozilla/5.0’ at their beginning. This is a remnant from the late 90s browser wars and was first used by Netscape, a leading browser back then. Since websites often created versions optimized for popular browsers, requests from less popular browsers were likely to be rejected as suspicious.

To overcome this, the less popular browsers made custom user agent strings starting with Mozilla/5.0 to make it appear like popular user agents of more dominant browsers. This way they ensured compatibility with websites designed for big browsers.

However, the token’s current usage in the useragent header is solely for formality reasons and has little bearing on the actual browser under use.

Operating System

This part of the useragent header reveals details about the operating system. In our user agent example ‘Windows NT 10.0’ signifies the operating system as Windows 10 and ‘Win64; x64’ means that it's the 64-bit version of Windows 10, running on x64 device architecture.

This bit differs across devices and may have varying numbers of terms separated by “;”. For instance, in the Chrome user agent for Linux, this part looks something like ‘(X11; Linux x86_64)’ indicating that the version of Linux is X11 with a 64-bit x86 architecture.

Similarly, mobile devices also have their differences.

Here are some mobile user agent examples;

Android User Agent

  • Samsung Galaxy S22 5G running Android 13 with Linux Platform:

Mozilla/5.0 (Linux; Android 13; SM-S901B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36

  • Google Pixel 7 running Android 13 with Linux Platform:

Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36

iOS User Agent

  • iPhone 12 running iOS 13.0 compatible with macOS:

Mozilla/5.0 (iPhone12,1; U; CPU iPhone OS 13_0 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/15E148 Safari/602.1

Browser Rendering Engine

This part shows the browser rendering engine used by the browser. Rendering engines are responsible for translating HTML and CSS into visual and interactive web pages.

WebKit, originating from the KHTML engine, is the rendering engine for Apple Safari. Although previously adopted by Chrome and other Chromium-based browsers like Opera, Microsoft Edge, Vivaldi, and Brave, these have since transitioned to using Google’s ‘Blink’ engine, introduced by the Chromium project in 2013.

The AppleWebKit/537.36 still seen in common user agent strings is because it’s based on AppleWebKit.

Compatible Rendering Engines

This is another compatibility marker, indicating that the browser is compatible with the KHTML and Gecko rendering engines. This is largely historical and used for compatibility purposes. It also makes sense since Apple WebKit was a fork of the KHTML engine.

Since Firefox has its own rendering engine called Gecko, its mobile and desktop user agent strings don’t include KHTML, like Gecko except for Apple devices since they use AppleWebKit.

Here are some Firefox user agent examples;

  • Windows User Agent

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0

  • Android User Agent

Mozilla/5.0 (Android 14; Mobile; rv:123.0) Gecko/123.0 Firefox/123.0

  • iOS User Agent

Mozilla/5.0 (iPad; CPU OS 14_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/123.0 Mobile/15E148 Safari/605.1.15

Note: Firefox user agents typically have four components.

Actual Browser and Browser Version


This part tells about the actual browser where the user agent came from. In this case, the Browser was Google Chrome version 122. Websites use this bit to display the appropriate web content made for that browser.


Compatible Browser


The additional Safari/537.36 is there to show that the actual browser is based on Safari’s WebKit. The 537.36 shows the build number of Safari.


But in the case of a Safari user agent coming directly from the Safari browser, the string looks like this.


  • iPhone User Agent

Mozilla/5.0 (iPhone; CPU iPhone OS 17_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Mobile/15E148 Safari/604.1


  • iPad User Agent

Mozilla/5.0 (iPad; CPU OS 17_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Mobile/15E148 Safari/604.1

Version/17.3.1 shows Safari’s version while 604.1 is Safari’s build number. The Mobile/15E148 bit indicates this is a mobile device.

For curious minds, this blog offers a good explanation of how the User Agent components evolved throughout the years.

Moreover, to find out what each bit in your user agent indicates, pass it through this online tool. But for that, let’s first find out your UA string.

What Is My User Agent: User Agent Lookup

Now that you know what is a user agent, you may wish to know your browser’s UA string. There are many online tools for User Agent lookup. On Google simply searching ‘what is my user agent’ brings up your UA string as the top result.

Alternatively, you can find out your UA string using the browser’s console.

  1. Open developer tools on your browser by pressing F12
  2. Open Console tab
  3. Type navigator.userAgent and hit enter

Breaking Down What Is A User Agent: UA Components & How To Look It Up

A List Of User Agents Of Different Browsers

After it's clear what is a User Agent it’s important to know that there are more than one user agent types. Each browser UA differs from another, either in details or the number of components.

Here’s a list of user agents typically sent by different browsers to websites.

Firefox User Agent string

  • Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion

Chrome User Agent string

  • Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Edge User Agent string

  • Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.59

Safari User Agent string

  • Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1


It’s a Wrap!

User agent strings, while modifiable by clients, are unreliable for web administrators to protect servers against bot traffic. Additionally, they pose a privacy issue as they can be used for browser fingerprinting, tracking users based on their browser information. As online privacy awareness increases, there's a need to either abandon its usage or make it less identifiable. Browser vendors are developing a new system for client identification without "fingerprintable" features.

At AdsPower, we understand the growing concerns about online privacy and the widespread use of browser fingerprinting. That's why we are continuously developing and enhancing our virtual browser profile technology. The SunBrowser (Chromium kernel) with the user-agent version has been updated to Chrome 121 in AdsPower.

Breaking Down What Is A User Agent: UA Components & How To Look It Up

These profiles serve as digital identities, allowing users to manage their online presence with more control. By offering a variety of browser fingerprint spoofing options, AdsPower enables users to customize more diverse, authentic-like fingerprints, making it more difficult for websites to track them across the web.

Breaking Down What Is A User Agent: UA Components & How To Look It Up

This was our guide to answer what is a user agent and its components. We hope that after reading it, you now have a deeper knowledge of the user agent, its components, and how it's used at the backend when you request a website.


AdsPower

Tüm Sektörler İçin En İyi Çoklu Giriş Tarayıcısı

Breaking Down What Is A User Agent: UA Components & How To Look It Up