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, and soon there will be upgrades to our cloud service and data file.
Once all of these updates have rolled out, customers who upgrade to the newest version of our device detection will have support for User Agent Client Hints.
Update for June 2022: version 4.4 of the 51Degrees service contains full User Agent Client Hints support. Find out more in our version 4.4 blog.
We've talked about this support before, but what does it mean exactly, and how do you get started with this new feature? While we gradually release our User Agent Client Hints support over the next few weeks, this blog has been created as the answer to any questions you may have on this support within 51Degrees’ device detection.
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 more information on Client Hints, and why Google are interested in replacing the UA string with Client Hints, we’ve created LearnClientHints.com. Here you will find all you need to know on the history of these request headers.
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 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 proposal, the process becomes a little more complicated as information on the device is now sent via the second request.
First, the browser makes a request to the web server. Then, the web server requests for the UA-CH header information on the device from the browser. The browser then sends this UA-CH information to the web server, which in turn sends the configured web page for the device. Phew.
What UA-CH headers are requested by the server?
Each User Agent Client Hint returns a HTTP
Sec-CH-UA header. This header gives the server information found in a basic User Agent, such as what browser and browser version is used by the device.
Once you understand
Sec-CH-UA, the other User Agent Client Hints become pretty self-explanatory:
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.
Sometimes it’s easier to learn when you test things for yourself. You can find out how User Agent Client Hints works using our UA-CH page.
Note: since UA-CH are currently a Chromium-based feature, this page will only show results if you are using a Chromium browser (Chrome, Edge, or Opera for example).
The release of version 4.3 of our APIs has introduced three new property values within our device detection. If you are looking for UA-CH support with 51Degrees, head to our configurator and select the below three properties.
|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? And what’s the big deal with User Agent Client Hints support?
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.
It’s only been a few months, but User Agent Client Hints have already made themselves known.
We’ve been doing a little bit of investigation into our website traffic. Prior to the stable release of UA-CH in Chrome 89, only 11% of our website traffic contained UA-CH data. (Hang on a second, if UA-CH were released in March 2021, why would you see UA-CH data before this date? The answer is simple; UA-CH have been gradually rolled out to Canary, Dev, and Beta Chrome populations since May 2020.)
With every new Chrome version that is released to the public, the number of UA-CH data sets we see within our traffic begins to increase.
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 within the next few months, 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. Google are gearing up for UA-CH to replace the User Agent string in the second half of 2022. 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?
Update (May 2022): Full User Agent Client Hints support is now available in version 4.4 of 51Degrees. Find out more in our version 4.4 blog, or get started by following the steps below.
User Agent Client Hints support was introduced to the 51Degrees API in version 4.3 and was completed in version 4.4.
Alongside UA-CH support, version 4.3 and 4.4 include a number of new features and improvements. We posted a blog discussing these new features in version 4.3, and a new blog detailing the full User Agent Client Hint support in version 4.4.
To cut a long story short, if you are a current version 3 on-premise customer of ours looking to convert, take a look at our v3 to v4 documentation to get started. For cloud customers using version 3 of our service, you will need to generate a Resource Key with your chosen properties via our Cloud Configurator. If you need a helping hand, just drop us a message and our Sales team will get back to you.
If you haven’t yet joined the real-time data revolution, all you need to do is sign up for a pricing plan. You will automatically be granted access to the latest version of 51Degrees. For more information on what device detection properties you need, take a look at our property dictionary.
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.3 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 header request, 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!