User Agent Client Hints

User Agent Client Hints

This page demonstrates how User Agent Client Hints (UA-CH) work.

First-parties

By default, Chromium will send two headers (sec-ch-ua and sec-ch-ua-mobile). If additional headers are required then the server must request them by sending an appropriately populated 'Accept-CH' header to the client.

This tells the browser that we would like it to send the additional UA-CH HTTP headers in future requests.

Below, you can modify the headers that are being requested using 'Accept-CH' and see the effect this has in the UA-CH headers that are visible to the server.

Please note: as UA-CH is currently only available in Chromium browsers, this test page will not work if you are using Firefox or Internet Explorer for example.

UA-CH headers visible to the server

UA-CH headers requested by the server:

What about third-parties?

By default, UA-CH headers will not be sent to third-parties, even if they are requested using the Accept-CH header.

For example, this page makes a call to a 'third-party' server at 51degrees.tv, which will respond with the UA-CH headers that it is able to see.

Initially, this will be nothing. Once the 'set permissions-policy' check boxes have been selected, the page at 51Degrees.com will set the permissions-policy response header with values that allow the browser to send UA-CH headers to 51Degrees.tv. Therefore, the next request for 51Degrees.tv will include the Client Hints, which will then appear in the list of values visible to the third-party below.

UA-CH headers visible to third party

UA-CH headers that will be included in set permissions-policy:

Further reading

We've shown you how User Agent Client Hints work and what values can be returned. Do you want to learn more about the history of Client Hints? Perhaps you have some unanswered questions on the HTTP headers? Don't worry, we've got you covered. Click on the links below to learn more:

  1. User Agent Client Hints - Your questions answered
  2. Explore the history with Learn Client Hints
  3. More blogs on the topic of Client Hints