Open AdmDevelopment opened 11 months ago
It appears they are now storing specific information inside User Agent Client Hints in the HTTP headers: https://web.dev/articles/migrate-to-ua-ch
That is the most stupid solution ever proposed in the space of User-Agents and Web in general.
The original RFC 1945 from May '96 states that the field "can contain multiple product tokens", a product token being something like MyBrowser/12.3.4
or simply MyBrowser
.
This has always been broad enough to offer low entropy so that an user cannot be uniquely tracked.
On the mentioned article and the specs, Google describes User-Agent as the main actor of "passive fingerprinting", "being difficult to process", "there's a lot of entropy wrapped up in the UA string", etc. This is absolute bollocks:
Related to https://github.com/serbanghita/Mobile-Detect/issues/906#issue-1461797596
This problem is worse now. The User Agent for Chrome running on my Pixel tablet is
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
It no longer contains "Android" so isMobile() returns false.
I also tried javascript navigator.userAgentData.mobile and it too returns false.
Thanks to Chrome's "user agent reduction" the user agent in Chrome no longer contains dynamic device and operating system information. For Android the operating system is fixed as Android 10 and the device model is set to K. The only thing that appears to be dynamic is the Major Version of Chrome. They did this to combat fingerprinting.
More info: https://developer.chrome.com/blog/user-agent-reduction-android-model-and-version/
The user agents are:
Android Tablet using Chrome: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{MAJOR_VERSION}.0.0.0 Safari/537.36
Android Smartphone using Chrome: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{MAJOR_VERSION}.0.0.0 Mobile Safari/537.36
Replace {MAJOR_VERSION} with 117 for the user agent in Chrome 117 on android devices.
On Android tablet devices the isMobile() method currently returns true since "Android" matched, however isTablet() fails to detect the tablet device.
I added the following to $tabletDevices in MobileDetect v4.8.02 to detect the Android tablets using Chrome: "ChromeUserAgentReductionAndroidTablet" => 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/(\d+).0.0.0 Safari/537.36'
I used the complete user agent since it should be static except the Major Version.
It appears they are now storing specific information inside User Agent Client Hints in the HTTP headers: https://web.dev/articles/migrate-to-ua-ch