October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

What Is a User Agent? How Browsers Identify Themselves

A user agent is the client software making an HTTP request. Learn what its header can reveal, why it is not proof of browser or device identity, and when developers should use feature detection instead.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A user agent is the software that makes a request to a server—usually a web browser when you visit a site. The User-Agent HTTP request header is a text description of that software, but it is not proof of which browser, device, or person is actually making the request. Websites can use it to diagnose compatibility issues or understand broad usage patterns, but developers should not rely on it alone to decide whether a browser supports a feature.

What does “user agent” mean?

In HTTP, a user agent is the client software that initiates a request. Browsers are familiar examples, but the term also applies to other software that makes HTTP requests. It refers to the requesting program, not the person using it. The HTTP Semantics standard defines the term and the related request field in RFC 9110.

As an Amazon Associate I earn from qualifying purchases.

The User-Agent header is a text field sent with an HTTP request. Its value typically contains product identifiers and may include comments. Browsers often include several tokens, including compatibility labels, so the string is not necessarily a simple statement of the browser’s actual identity.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does a User-Agent string tell you?

A User-Agent value can offer clues about the client software and, depending on the browser and its configuration, the platform. It does not reliably give a complete or truthful account of the browser or device. Values may reflect compatibility conventions, privacy reductions, or user configuration.

#1 Best Overall
Sale
Pearson Computer Networking, 8E
  • brand: Pearson
  • Computer Networking, 8e

RFC 9110 describes the general syntax as a product followed by optional product identifiers and comments. A browser-oriented pattern is User-Agent: <product>/<product-version> <comment>, but real-world strings may include multiple tokens and legacy labels. Treat a string as information to interpret cautiously, not as a dependable browser-detection recipe. See MDN’s User-Agent header reference for examples.

MDN’s reference includes a Chrome-on-Android-style reduced example: it retains a Chrome major version while using generic platform and model details and zeroed lower version components. That illustrates one browser-specific reduction pattern; it is not a universal format or a description of every browser.

Why do websites inspect the header?

Servers may inspect User-Agent values for several practical reasons identified in RFC 9110:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Diagnosing interoperability: investigating a report that a particular client behaves differently.
  • Applying a workaround: addressing a known client limitation when there is no better option.
  • Tailoring a response: adapting content or behavior for a client, with care not to assume that the string is accurate.
  • Usage analysis: estimating broad patterns in the software clients making requests.

RFC 9110 says a user agent SHOULD send a User-Agent header in each request unless specifically configured not to. “SHOULD” is the standard’s recommendation; it does not guarantee that every request contains the header or that its value is unaltered.

Can a website identify your browser or device from it?

A site can read the User-Agent value its server receives, and that value may name software or include platform clues. But the header alone is not a reliable identity check: it can be reduced, changed, or misleading, and it does not by itself establish who is using the client. Detailed values can also contribute to browser fingerprinting when combined with other characteristics. RFC 9110 discusses the privacy risk of excessive identifying detail; that risk does not mean the header uniquely identifies every user.

Why is browser detection by string matching brittle?

Matching a User-Agent string to choose site behavior—often called UA sniffing—can fail as browsers change their strings, include compatibility tokens, or reduce details. A browser name also does not prove that a particular API or feature is available. MDN recommends feature detection and progressive enhancement for behavior decisions in its guide to browser detection using the user agent string.

  • If you need to know whether a web API works, test for the capability rather than inferring it from a browser name.
  • If you need responsive layout or device adaptation, use the relevant web platform capabilities instead of treating the header as a device database.
  • If a narrow, documented browser workaround is unavoidable, isolate it and keep it easy to remove.

User-Agent strings and Client Hints compared

HTTP Client Hints offer a more selective way for a site to request certain client details in supporting environments. They do not replace feature detection when the real question is whether a capability works.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Approach How information is shared Reliability and availability Privacy considerations
User-Agent string Sent passively in the request header when present; often contains product tokens and may contain comments. Widely encountered, but can be verbose, reduced, configured, or misleading. Detailed platform and version information can contribute to fingerprinting when combined with other characteristics.
User-Agent Client Hints Selected information can be requested through an opt-in mechanism, commonly using the Accept-CH response header; supporting clients may return Sec-CH-UA-* headers. Support and availability vary. Check compatibility and account for client settings. More explicit and selective, but still discloses client information when requested and provided.

The protocol for Client Hints is described in RFC 8942. MDN explains current usage and support considerations in its guides to HTTP Client Hints and the User-Agent Client Hints API. Higher-entropy values in the JavaScript API require an explicit request. Request only details needed for a defined purpose, and do not assume every client will provide them.

What is User-Agent reduction?

User-Agent reduction limits some passively shared detail in supporting browsers, such as exact platform or operating-system versions, device models, and minor browser-version information. The precise behavior depends on the browser; implementations are not identical. Where a site has a justified need for additional details, Client Hints can request selected information in supporting environments. MDN describes the approach and examples in its guide to User-Agent reduction.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Capture a page with a chosen User-Agent

If you are testing how a site responds to a particular request header, you can send a custom User-Agent with your own HTTP client or browser automation. A custom value changes what the request claims; it does not make the client behave like a different browser or guarantee that the site will serve a particular version of the page.

Using cURL

For a simple HTTP response, pass a User-Agent with -A:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -A "ExampleTest/1.0" -L https://example.com

To inspect response headers, add -i. This retrieves the HTTP response, not a rendered screenshot of the page.

Using browser automation

In browser automation, set the User-Agent when creating the browser context or session, using the API for your chosen automation library. The setting affects requests from that context, but other browser characteristics can still differ. A User-Agent override by itself is not a complete or dependable way to simulate a device or browser.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request can return a PNG, JPEG, WebP, or PDF, and its API accepts custom user agents for captures. Before capture, it accepts consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, with response headers indicating the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients.

Example cURL request (replace the URL and supply your API key):

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request parameters, including the custom User-Agent option. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.