Back to blog

UA (User-Agent) Technical Fundamentals: HTTP Request Headers, Browser Identification, and Client Hints

Starting with a web request, learn what a User-Agent contains, how it supports browser compatibility, why traditional UA strings carry historical baggage, and how UA Reduction and User-Agent Client Hints are changing the way browsers share information.

When you open a webpage in a browser, the server receives not only the requested path but also a set of HTTP header fields describing the request. One common field is User-Agent, abbreviated UA. It looks like a complex string of product names, versions, and parenthetical notes, and historically it has been used to determine browser compatibility.

But UA does not mean device identity. To understand it, you need to distinguish three questions: how a client describes itself, how websites use that information, and why browsers are reducing the details they expose by default. Understanding all three helps you interpret UA data correctly and avoid misjudgments in web development and compatibility testing.

1. What Is UA? Understanding Its Place in an HTTP Request

In HTTP, a user agent is the client software that initiates a request, such as a browser or another HTTP client. User-Agent is a request header field that provides information about the client product. These are related but distinct concepts: the former is a software role, while the latter is data in the protocol.

A typical webpage visit can be simplified into three stages:

  1. The browser constructs a request for the resource, including the request method, path, and relevant headers.
  2. The server receives the request, handles access to the resource, and decides whether to use the information declared by the client as part of its business logic.
  3. The browser receives the response, parses the HTML, CSS, and JavaScript, and continues requesting other resources the page needs.

UA is application-layer information used in the first stage. It is not part of the URL or a network connection address. Here is a fictional client request for illustrative purposes:

GET /docs HTTP/1.1
Host: example.org
User-Agent: ExampleBrowser/7.0 (ExampleOS)
Accept: text/html

Here, the path /docs indicates which resource to request, Accept expresses the content types the client accepts, and User-Agent describes the client software making the request. Each field has a different meaning, and the server can read them while processing the request.

With HTTPS, TLS protects HTTP request contents during transmission; the server that terminates the connection and processes the HTTP request can still read the UA. Transport encryption and application-layer access to header fields are not contradictory.

2. Why Are Real UA Strings So Long?

According to RFC 9110's definition of User-Agent, a UA consists of product identifiers and optional comments. A product identifier can include a version number, and multiple product identifiers can appear in the same field.

Real-world browser UAs are often more complex than the fictional example above. This is because, as the Web evolved, websites implemented compatibility branches for different browsers. Later browsers retained some historical identifiers to remain compatible with existing websites.

Common componentHow to interpret it
Product nameA product or related compatibility identifier declared by the client
Version numberSoftware version information exposed according to the client's current policy
Parenthetical commentsMay include platform details or other compatibility information
Historical identifiersNames or comments retained for compatibility with existing websites

For example, strings such as Mozilla, AppleWebKit, and like Gecko may appear in a UA because of historical compatibility requirements. Seeing one of these terms on its own does not mean that the browser actually runs the full product or engine associated with that name. A UA is a textual description from the client, not a report generated by measuring the underlying software implementation.

This also explains why UA parsing is error-prone: simple keyword matching may match multiple identifiers at once. Even if a parsing library can accurately classify historical samples, its rules need updating as browser declaration formats evolve.

Websites can access client description information from two different execution contexts.

  • Server side: When an HTTP request arrives, the server can read the User-Agent request header for compatibility statistics or to investigate client-related issues.
  • Page side: After the browser loads a page, JavaScript can read the default UA description the browser provides for the current environment through navigator.userAgent.

The WHATWG HTML Standard defines navigator.userAgent. It is closely related in meaning to the HTTP UA, but the two are handled in different places: one is a network request field, and the other is an interface the browser provides to scripts. When analyzing network logs and page script behavior, developers should be clear about which layer of data they are observing.

Likewise, UA is not the same as a cookie. Cookies are generally used to pass session state or site-stored data between requests; UA primarily describes client software. Combining browser version, session state, and user identity in the same field leads to incorrect data modeling.

4. UA Reduction: Why Are Version Numbers Becoming Less Precise?

Traditional UA strings may include detailed browser build information, operating system versions, or device information, but not every website needs these details. Sending such information with ordinary requests also increases privacy exposure and the cost of maintaining browser compatibility.

Chromium therefore introduced User-Agent Reduction (UA Reduction). According to Chromium's official implementation record, the change was rolled out in stages across multiple versions:

  • Starting with the Chrome 101 phase, less default information was exposed about browser minor versions, build numbers, and patch numbers.
  • In the Chrome 107 phase, some desktop platform descriptions were standardized.
  • Starting with the Chrome 110 phase, UA reduction began rolling out to Android phones and tablets.

The core idea is not to remove the User-Agent request header, but to reduce the granularity of the data it carries. You can think of it as turning a profile card with many specific details into a simplified label suited to ordinary communication.

If a version field in a server log appears to remain constant, that does not mean the client has not been updated. Statistics and compatibility analysis should account for what the data fields actually mean and distinguish descriptions that have been standardized from actual software release versions. Other browsers' specific approaches should also be assessed based on their own implementations, rather than assuming Chromium's rules apply to every client.

5. How Do User-Agent Client Hints Change the Way Information Is Shared?

UA Client Hints, or UA-CH, extend the Client Hints mechanism to browser information. Unlike the traditional UA, which combines multiple types of information in a single string, UA-CH aims to split information into clearly defined fields and limit the amount exposed by default.

At a high level, browsers that support UA-CH provide basic hints according to their own policies. When a site genuinely needs additional data, it can request it through a standard negotiation mechanism, and the browser decides which information it can provide. Chrome's developer documentation describes the privacy and compatibility goals of this design.

For example, over a secure connection, Chrome may provide basic fields such as Sec-CH-UA (browser brands and major versions), Sec-CH-UA-Mobile (a mobile-device hint), and Sec-CH-UA-Platform (platform information). Each has its own meaning, so there is no need to guess what each part of a single string represents.

DimensionTraditional UA stringUA Client Hints
Data representationMultiple identifiers in one stringDifferent information expressed in separate fields
Default dataA string provided according to browser policyPrimarily basic hints
Additional informationLimited to what the string containsDetermined through negotiation and browser policy
MaintenanceParse historical names and formatsProcess data according to field semantics

UA-CH is not a universal replacement across all browsers. Sites that need to support multiple browsers may encounter both traditional UA and modern information interfaces. Good design allows for missing information or different levels of detail and keeps essential business functionality separate from optional client description data.

6. What Real-World Compatibility Problems Can UA Help Address?

Suppose a team maintains its own web application, and the updated page has layout issues in some browsers. UA information can provide context in a bug report and help the team get an initial sense of which client categories are involved, but it cannot directly prove whether a browser supports a particular feature or identify the root cause on its own.

A more reliable troubleshooting process is to define the issue first, reproduce it, and then verify the specific feature or style causing it. For example, if a layout relies on CSS Grid, verify how that layout actually behaves in the test targets. If the code depends on a Web API, check whether the interface is available and provide a suitable fallback. This is more robust than maintaining a list of rules that branch only on browser names.

For teams handling multiple website acceptance tests, TabProfile offers separate browser workspaces that can be used to organize test sessions and distinguish tasks. Clearly recording the test purpose, target page, and actual result, alongside existing client information and reproduction notes, is more helpful for future collaboration than recording just a UA string.

7. Frequently Asked Questions

Is UA a device ID?

No. It describes client software and the compatibility information it exposes, and multiple devices may have the same description. Browser properties are environmental information, while account or session identity comes from different business mechanisms. UA should not be used as a unique identity identifier.

Can websites still determine browser compatibility after UA strings get shorter?

Yes. Sites can use normalized client information as needed. More importantly, they can directly detect feature support and adapt to different clients using responsive design and progressive enhancement.

Do all browsers follow the same policies for UA and UA-CH?

HTTP defines the semantics and basic syntax of the User-Agent field, while which details are exposed and whether UA-CH is implemented depend on browser implementation and policy. When comparing browsers, distinguish protocol specifications from product implementations.

The key to understanding UA is to treat it as a description of the client in an HTTP communication, not as definitive proof of browser capabilities or user identity. From traditional strings to UA reduction and then structured Client Hints, the direction of change is to reduce unnecessary information sharing while preserving clear interfaces for legitimate compatibility needs.