User-Agent string
The browser's self-description sent on every request and readable in JavaScript.
In one line
Can see your browser brand, version, OS family, and chip family on every request
The browser's self-description sent on every request and readable in JavaScript.
Tells the site browser brand and major version, OS family, and CPU family. Used for compatibility and bot filtering. Since UA reduction the string is coarse, so finer detail moved to opt-in Client Hints.
What it can and can't do
What the user does: Nothing. Your browser sends it with every page request
It can
- See the browser brand and major version
- See the OS family and chip family
- Choose a layout or fix that suits it
- Block or flag likely bots
It cannot
- See finer detail; Chrome now keeps that in opt in hints
- See your exact device model
- Be sure it is true; tools can fake it
- See your name, location, or accounts
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 1 | 2004-11-09 | None |
| Safari | Supported | 1 | 2003-06-23 | None |
| Safari on iPhone | Supported | 1 | 2007-06-29 | None |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | navigator.userAgent, navigator.appVersion, User-Agent request header |
| Browser compat keys | api.Navigator.userAgentapi.Navigator.appVersion |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | read fresh on every page load; nothing stored |
| How to take it back | none needed (no grant) |
| Inside an iframe | Readable from cross-origin iframes too (same values) |
Typical flow
- Page script reads the value
- No prompt is shown
Data you get
Shape: object
How often: static per session
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
userAgent | string | chars | about 70 to 200 chars | Chromium reduced: major version only, minor zeroed |
OS token | string | None | Windows NT 10.0; Win64; x64 | Macintosh; Intel Mac OS X 10_15_7 | X11; Linux x86_64 | Android 10; K | iPhone OS 18_x | frozen since Chrome 107 desktop, Chrome 110 Android |
Firefox rv | string | None | rv:109.0 on Firefox 110 and later | frozen at 109 |
Technical limits
- Cannot reliably state exact OS minor version on Chromium, Safari or Firefox
- Can be spoofed trivially by extensions or DevTools
- iPadOS 13+ reports Macintosh, not iPad
The story
What it is
The browser's own description of itself, sent on every request and readable by scripts.
For you
You never see it. It rides along every time you open a page. It lets the site pick the right version, like a phone layout or a desktop layout, and sort out bots.
For makers
Compatibility, bot filtering and basic analytics all start here. With reduction, the string is coarse, so more people look the same. Makers often combine it with other signals to check whether a visitor is who they claim to be.
Where you see it
| Type | Example | Apps |
|---|---|---|
| developer | A web app shows a banner for a browser version that is too old to run it. | None named |
| security | A web firewall blocks traffic from strings known to belong to scrapers. | Cloudflare |
| ads | An ad server filters out crawlers by their strings so advertisers are not charged for them. | Google Ad Manager |
| analytics | A product team reads strings to decide which browsers still deserve support. | None named |
| games | A browser game shows a message to people on a browser with no WebGL. | None named |
| media | A video player picks the right format for Safari versus Chrome. | YouTube |
| enterprise | An IT team blocks company logins from unapproved browsers. | None named |
Risks
- Easy to fake
- Combines with other signals
What the platform says
- MDN: User-Agent header. Docs explain the header and note that browsers now send less detail for privacy.
Good uses and abuse
Legitimate uses
- Serve right code path
- Block outdated browsers
- Bot scoring
Known abuse
- Combined with other signals for tracking
- Unmasking version for exploit targeting
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 10 | Rough identifying entropy, when known |
A real example: LinkedIn
Collected as userAgent, appName, appCodeName, appVersion, product, productSub, vendor. Read by the LinkedIn APFC fingerprint script (48 features, alleged by BrowserGate, partly confirmed by BleepingComputer).
History
- 2020-09, Safari 14: macOS token already frozen at 10_15_7 (Big Sur and later still report it)
- 2022-05, Chrome 101: Minor, build and patch version zeroed in UA string (101.0.0.0)
- 2022-10, Chrome 107: Desktop OS and CPU frozen to Windows NT 10.0, Intel Mac OS X 10_15_7, Linux x86_64
- 2023-02, Chrome 110: Android version frozen to 10 and device model replaced by K; phase complete by Chrome 113
- 2023-02, Firefox 110: Gecko rv version frozen at 109.0
Related capabilities
Related
- UA Client Hints, low entropy. Can see your browser brand, whether it is mobile, and your OS name
- navigator.platform. Can see a short label for your OS family, like Win32, MacIntel, or iPhone
Sources
- AmIUnique: Beauty and the Beast, Laperdrix et al. 2016 (attribute entropy)
- MDN Navigator.userAgent
- Chrome UA reduction
- fingerprintjs source: vendor
- Hiding in the Crowd, Gomez-Boix et al. 2018 (2M fingerprints)
How well checked: Checked against real behavior.