User-Agent Client Hints are one of the biggest changes to the device detection industry. Here’s what you need to know.
August has been a busy month for us; last week we released Version 4.3 of our API packages. Now, Version 4.4 of 51Degrees contains full User-Agent Client Hints support.Get support for User-Agent Client Hints
We've talked about this support before, but what does it mean exactly, and how do you get started with this new feature?
What are User-Agent Client Hints?
User-Agent Client Hints (UA-CH) are an extension to Client Hints, a set of HTTP header requests that relay information (such as the device, network, or user) from the client to the server.
UA-CH were first publicly introduced in January 2020 by Google for their Chromium browsers as a replacement for the User-Agent request header. Rather than information being passed to the server via the User-Agent string, information is sent via Client Hints.
For the history of Client Hints, we created LearnClientHints.com. Alternatively, on 28 September 2022, we also hosted a webinar on User-Agent Client Hints; catch it on replay here or read an edited transcript here.
How will the HTTP header request process change?
Currently, when a browser (on a device) accesses a web page, the browser sends the User-Agent string via a HTTP request header to the web server. The server then uses the device information contained in the UA string to sending a configured version of the web page back to the browser. This web page is then displayed on your device.
This process has been used on the web for decades now. However, with User-Agent Client Hints and Google’s User-Agent reduction, the process becomes a little more complicated as information on the device is now sent via multiple requests.
What UA-CH headers are requested by the server?
Each User-Agent Client Hint returns a HTTP
Sec-CH-UA header. But what is
Sec-CH-UA? This header gives the server information found in a basic User-Agent, such as what browser and browser version is used by the device.
The other User-Agent Client Hints build upon
Sec-CH-UA by including more specific information:
Sec-CH-UA-Mobileindicates whether the device is a mobile or not a mobile.
Sec-CH-UA-Modelrefers to the device model.
Sec-CH-UA-Platformdescribes the native platform that the browser is running on – think Windows, Linux, or Android, to name a few.
Sec-CH-UA-Archrefers to the underlying CPU architecture of the device.
Sec-CH-UA-Full-Versionspecifies the full version number of the browser. For example, if
Sec-CH-UAindicates the browser is version 92, the
Sec-CH-UA-Full-Versionvalue could be 92.0.4515.107. Google has since deprecated this field, and are urging developers to use
Sometimes it’s easier to learn when you test things for yourself. You can find out how User-Agent Client Hints works using our Client Hints demo page or our HTTP header parser, which accepts User-Agent Client Hints input data alongside the User-Agent.
Note: since UA-CH are currently a Chromium-based feature, these page will only show UA-CH results if you are using a Chromium browser (Chrome, Edge, or Opera for example).
Three new properties were added to the 51Degrees service to accomodate for User-Agent Client Hints.
|51Degrees property value||Description||Example|
|SetHeaderBrowserAccept-CH||Represents the browser's brand, major version, and full version. This property accepts the values
"Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92"
|SetHeaderHardwareAccept-CH||Represents the hardware's brand, indicating whether the User-Agent is mobile or not. This property accepts the values
|SetHeaderPlatformAccept-CH||Represents the platform's operating system and version number. This property accepts the values
Why should I upgrade to the latest version of the 51Degrees API?
User-Agent Client Hints have been fully rolled out since Chrome 89, which was released 3 March 2021. Any subsequent Chrome versions will have the UA-CH feature, so by getting ready now for UA-CH support, you are future-proofing your device detection.
When you consider Chrome’s dominance within the market share of browsers (a whopping 65% of website users use Chrome!), it’s safe to assume that User-Agent Client Hints data will be included in the majority of website traffic.
At the moment, only Chromium-based browsers are using User-Agent Client Hints to pass information from the client to the server. Other browsers may see this change and decide that this is the best route forward for the Web. We hope that doesn’t happen, but by including UA-CH support in our device detection, our customers are ready for any major industry change.
How do I get User-Agent Client Hints support?
Whether you're a new customer, or a current customer 51Degrees, follow the instructions below to get started with User-Agent Client Hints support.Get started with UA-CH support
I’m using an earlier version of the 51Degrees API, will my data file still work?
Yes! The earlier data file versions will continue to work. The biggest difference that will affect you is that you will not have support for User-Agent Client Hints unless you upgrade to Version 4.4 or later.
We recommend upgrading to the latest version of our API; we constantly review our product to ensure that the quality of our code is improved through regular bug fixes. See the above section for instructions on how to upgrade to the latest version of our API.
Who knew one feature could create so many questions?
User-Agent Client Hints are a big change to the device detection industry! It’s important to stay prepared for their probable (and not ideal) roll-out to other browsers. Although we don’t think User-Agent Client Hints should replace the User-Agent request header, we need to be prepared so our customers get a robust device detection service.
If you have any more questions on the User-Agent Client Hints support within our real-time data services, please do get in touch. It's time to fortify your device detection against future industry changes and get started with the latest version of the 51Degrees API!