# DeviceAtlas Client Hints Support # This document describes Client Hints and how they are used in the API. The DeviceAtlas 3.1.7 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 `<meta http-equiv="Accept-CH" content="Sec-CH-UA-Model, Sec-CH-UA-Platform-Version..">`). 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: `<script type="text/javascript" src="https://cs.deviceatlas-cdn.com/dacs.js" async></script>` 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.1.7 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 _ <!-- HTML+JS for document formatting when opened in browser --> <div class="btn-group" id="main-menu" style="float:right"><a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Menu<span class="caret"></span></a><ul class="dropdown-menu"><li><a href="README.html">Main</a></li><li><a href="README.Installation.html">Enterprise API Installation</a></li><li><a href="README.DataFileConfig.html">Data File Configuration</a></li><li><a href="README.DeviceApi.html">Device Identification API</a></li><li><a href="README.CarrierApi.html">Carrier Identification API</a></li><li class="disabled"><a href="README.ClientHints.html">Client Hints Support</a></li><li><a href="README.Upgrade.html">Device API Upgrade</a></li><li class="divider"></li><li><a href="./DeviceApiDocs/classes.html">Device API Docs</a></li><li><a href="./CarrierApiDocs/classes.html">Carrier API Docs</a></li></ul></div>