User Agents

Web browsers and everyday web tech, explained

Chrome Client Hints Explained for Beginners

· 6 min read · Browsers

In this article
  1. Background: Why Client Hints Were Introduced
  2. How Client Hints Work
  3. How to Choose Which Hints to Use (for Developers)
  4. Common Problems and Misconceptions
  5. Client Hints vs. User-Agent String
  6. How to Manage Client Hints in Chrome (for Users)
  7. Safety and Privacy Considerations
  8. Alternatives to Client Hints
  9. Frequently Asked Questions

Chrome Client Hints are HTTP headers that let websites request specific information about your browser and device (like screen width, connection speed, or operating system) instead of using the older User-Agent string. This article explains what they are, why they exist, how they work, and how to manage them.

Background: Why Client Hints Were Introduced

For decades, websites identified browsers and devices by reading the User-Agent (UA) string—a long, messy text that tries to describe everything from browser version to CPU architecture. Over time, the UA string became bloated and inconsistent: browsers added fake tokens to avoid being blocked, and developers had to parse fragile patterns. Google engineers saw two main problems:

  • Privacy: The UA string sends a lot of information to every website, even if the site only needs to know if it's a mobile browser.
  • Maintenance: Updating UA strings for new devices or browsers was error-prone and often broke sites.

Client Hints were proposed as a cleaner alternative: the browser tells the server which capabilities it supports, and the server explicitly asks for only the details it needs. Chrome started supporting Client Hints in version 56 (2017) and has gradually expanded them. Other browsers like Firefox and Safari have adopted some parts, but Chrome is the primary driver.

How Client Hints Work

Client Hints work through HTTP headers. The process has two main steps:

  1. Server advertises support: The server sends a response header like Accept-CH: Viewport-Width, DPR to tell the browser, "I can use these hints."
  2. Browser includes hints in later requests: On subsequent requests to that server, the browser adds the requested headers (e.g., Viewport-Width: 375, DPR: 2).

Some hints can also be sent as JavaScript-accessible values via navigator.userAgentData (part of the User-Agent Client Hints API). For example, a site can call navigator.userAgentData.brands to get a list of browser brands and versions without parsing a UA string.

Common Client Hints include:

  • Device-Memory – approximate amount of device RAM (e.g., 0.5, 2, 4, 8)
  • DPR – device pixel ratio (e.g., 1, 2, 3)
  • Viewport-Width – CSS pixel width of the viewport
  • Width – actual width of the resource requested (for images)
  • ECT – effective connection type (e.g., 4g, 3g, slow-2g)
  • UA – structured browser information (replaces the UA string)

How to Choose Which Hints to Use (for Developers)

If you run a website, you don't need to use Client Hints at all—most sites work fine without them. But if you want to optimize images or adapt content, here's how to decide:

  • Start with the simplest: Use DPR and Viewport-Width to serve appropriately sized images. This is the most common use case.
  • Only request what you need: Each hint you request is a potential privacy concern, so avoid asking for UA unless you truly need to distinguish browser versions for a specific feature.
  • Test with real devices: Use Chrome DevTools to simulate different devices and see what hints are sent. You can also use the Accept-CH header on a test server to verify.
  • Provide fallbacks: Not all browsers support Client Hints. Always have a fallback using traditional methods (e.g., srcset for images).

Common Problems and Misconceptions

One common misconception is that Client Hints are a privacy disaster because they reveal device details. In reality, they are often more privacy-preserving than the UA string because the server only gets the specific hints it asks for, and some hints are coarse (e.g., Device-Memory is rounded to powers of two).

Another issue is that Client Hints can break caching. If a server sends different images based on DPR, but the CDN caches the first response, other users might get the wrong size. This is why many sites use the Vary header to tell caches to store multiple versions.

Also, some developers mistakenly think Client Hints are only for images. They can also be used for layout adaptation (e.g., serving a simplified layout on low-memory devices) or for analytics (e.g., measuring connection type).

Client Hints vs. User-Agent String

Here's a quick comparison:

FeatureUser-Agent StringClient Hints
Information sentFull string with many detailsOnly what server requests
FormatFree-form textStructured headers
PrivacyBroad, always sentOpt-in per hint
Browser supportAllChrome, Edge, some others

For most users, you don't need to worry about this—websites handle it in the background. But if you're a developer, you should know that Chrome is moving toward deprecating the old UA string in favor of Client Hints. As of Chrome 117 (2023), the UA string is reduced to a simplified version with only the browser name and major version, unless the site explicitly requests more via Client Hints.

How to Manage Client Hints in Chrome (for Users)

As a regular Chrome user, you have limited control over Client Hints—they are sent automatically when a site asks for them. However, you can:

  • Use Incognito mode: This doesn't block hints, but it prevents them from being tied to your browsing history.
  • Disable JavaScript: Some hints are only accessible via JavaScript, so disabling JS can reduce what sites can read, but it will break many sites.
  • Use privacy extensions: Some extensions can block or modify headers, but this may break functionality.
  • Switch browsers: Firefox and Safari have not fully adopted Client Hints, so they may not send them. However, this is not a reliable way to block them, as sites may fall back to UA string.

There is no built-in setting in Chrome to turn off Client Hints entirely. If you're concerned about privacy, consider using a browser like Firefox or Tor Browser, which have different policies.

Safety and Privacy Considerations

Client Hints do not contain personally identifiable information (like your name or IP address). They are similar to the data your browser already sends via the User-Agent. However, combining multiple hints could potentially fingerprint your device across sites. For example, a site could use Device-Memory, DPR, and UA to create a unique identifier.

To mitigate this, Chrome limits the precision of some hints (e.g., Device-Memory is rounded) and requires sites to opt in via Accept-CH. Also, Chrome has announced plans to add more controls for users, but as of now, there is no per-site toggle.

Alternatives to Client Hints

If you're a developer and don't want to use Client Hints, you have other options:

  • Responsive images with srcset and sizes: This uses viewport width and DPR from CSS, not HTTP headers, and works in all browsers.
  • CSS Media Queries: For layout adjustments, you can use @media (min-width: 600px) etc., which are based on viewport, not device memory.
  • Server-side device detection: Use a database of user-agent strings (like DeviceAtlas) to infer device capabilities. This is less accurate but works everywhere.
  • JavaScript feature detection: Check for specific APIs (e.g., navigator.hardwareConcurrency) instead of relying on hints.

Each approach has trade-offs. Client Hints are most useful when you need server-side decisions based on device capabilities, such as serving compressed images to low-memory phones.

Frequently Asked Questions

Do Client Hints slow down my browsing?

No. The headers are tiny and are sent only when a site explicitly requests them. The overhead is negligible compared to the page's HTML, CSS, and JavaScript.

Can I block Client Hints completely?

Not in Chrome's standard settings. You can use browser extensions that modify headers, but that may break sites that rely on them. Firefox and Safari do not send Client Hints by default, so using those browsers effectively blocks them.

Will Client Hints replace the User-Agent string?

In Chrome, yes. Google has been phasing out the full UA string since Chrome 101 (2022) and plans to freeze it entirely. Other browsers are not following this path as aggressively, but many sites are already using Client Hints.

Are Client Hints the same as cookies?

No. Cookies are small text files stored on your device, while Client Hints are HTTP headers sent with each request. Cookies can persist across sessions; Client Hints are sent fresh each time based on current conditions.

Do Client Hints work on mobile Chrome?

Yes, they work on both Android and iOS versions of Chrome. Some hints like Device-Memory are more relevant on mobile devices.