# DeviceAtlas Client Hints Support #
This document describes Client Hints and how they are used in the API.
The DeviceAtlas 3.2 API has full support for User-Agent
Client Hints.
## Client Hints Background ##
User-Agent Client Hints are a set of new HTTP headers that contain data
currently found in the User-Agent string. The rollout plan for User-Agent Client
Hints is being driven by Google Chrome and other Chromium based browsers. The
intention is to freeze or remove parts of the User-Agent string over time and
instead make the data available via User-Agent Client Hints.
The roadmap for Google Chrome Client Hint support can be found here:
https://blog.chromium.org/2021/09/user-agent-reduction-origin-trial-and-dates.html
The Client Hints definition can be found here:
https://wicg.github.io/ua-client-hints/
### High Entropy Client Hints ###
One very important aspect of Client Hints is the concept of high entropy and low
entropy Client Hints. Low entropy hints are sent on the first request from a
client browser to a server. Such hints include things like the platform name and
the whether the client would prefer a mobile experience. By default, the first
request **does not** include the high entropy Client Hints. High entropy Client
Hints are things like the device model and the full browser version.
The server must specifically request access to the high entropy client hints via
a `Accept-CH` response header or alternatively via a HTML meta tag
(e.g ``).
A list of low entropy Client Hints can be found here:
https://wicg.github.io/client-hints-infrastructure/#low-entropy-hint-table
### JavaScript Client Hints ###
DeviceAtlas has full support for Client Hints collected via JavaScript using the
DeviceAtlas client-side library. This approach avoids the need to update the
server configuration to set the `Accept-CH` HTTP header. To use the DeviceAtlas
client-side library add the following to the relevant web pages:
```html
`
```
The DeviceAtlas client-side library also enables Apple device identification.
### Additional Information ###
Please see the DeviceAtlas Client Hint implementation guide for how to request
the high entropy Client Hints and how to work around some Client Hint issues.
https://deviceatlas.com/user-agent-client-hints-implementation-guide
## DeviceAtlas Support ##
The DeviceAtlas 3.2 API can detect devices, operating
systems and browsers from User-Agents, Client Hints or a combination of both. It
is strongly recommended to pass all client HTTP headers to the DeviceAtlas API
for the most accurate detection. This will automatically happen if a
`HttpServletRequest` object is passed to the API. Alternatively, the HTTP
headers may be passed via a Map object to the API. Please see the examples in
the [README.DeviceApi.html](README.DeviceApi.html) document.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_ Copyright (c) DeviceAtlas Limited 2023. All Rights Reserved. _
_ https://deviceatlas.com _