Modern browser detection

User-Agent vs Client Hints

The classic user agent string is still useful, but modern browsers increasingly expose less detail by default. Client Hints were designed to make browser and platform disclosure more explicit and more selective.

User agent string

  • One compact text value with compatibility baggage.
  • Easy to log and easy to read at a glance.
  • Often enough for quick QA and analytics grouping.
  • Harder to parse reliably as reduction and spoofing increase.

Client Hints

  • Separate browser and platform fields rather than one long string.
  • Designed to expose detail more selectively.
  • Better fit for negotiated access to extra entropy.
  • Adds implementation complexity compared with simple user agent parsing.

Why the web moved in this direction

The old user agent string became overloaded. Browsers preserved historical markers for compatibility, sites built fragile browser-sniffing logic around them, and the string exposed more passive fingerprinting detail than many platforms wanted. Client Hints were meant to reduce default exposure while still giving sites a way to request specific browser and platform signals when those signals are genuinely needed.

In practice, this means older parsing logic still matters, but it is no longer enough to assume the raw user agent string is the complete browser-identification story.

Best for fast diagnostics

The user agent string is still the fastest thing to copy into a bug report or compare in a browser session.

Best for explicit negotiation

Client Hints are a better fit when a site needs selected browser or platform attributes beyond the reduced defaults.

Best for production logic

Use feature detection first, then combine it with user agents and Client Hints only where browser-specific behavior genuinely matters.

Best for compatibility review

Audit any old browser-sniffing code that assumes high-granularity version information will always be present.

Practical migration mindset

  • Keep the user agent for quick inspection, QA, and broad analytics normalization.
  • Avoid treating the raw string as a secure or complete device fingerprint.
  • Use feature detection for capabilities instead of inferring them from brand names alone.
  • Use Client Hints when the product truly needs structured browser or platform details.
  • Test modern reduced strings so your parser does not assume old patch-level precision.

Read the main parsing guide

Use the hub page if you want the token-level explanation behind older and modern browser patterns.

Open the guide

See concrete examples

Compare common Chrome, Safari, Firefox, Edge, and Android patterns before and after you think about Client Hints.

Open examples

Check your browser-side value

Use the checker when you need the current session value that JavaScript exposes right now.

Check my user agent

Start from the basics

Read the overview first if you want the broad definition and common use cases before comparing models.

Read the overview
What is the main difference between a user agent string and Client Hints?

A user agent string is one compact compatibility-driven text value. Client Hints expose browser and platform details through separate, more explicit fields that can be requested when needed.

Did Client Hints completely replace user agents?

No. User agents still exist, but they often expose less detail by default and are no longer the only browser-identification signal that sites may rely on.

Should I still parse user agent strings?

Yes for debugging, analytics, and some compatibility workflows. For important product logic, combine user agent parsing with feature detection and Client Hints where available.