-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClientHints plan upgrade #7274
Comments
Hi @sanchezzzhak, I have a question about reduced user-agent: Is it possible to detect device-type( mobile, tablet, desktop, etc.) in reduced user agent only without client-hints? Thanks! |
Hi, yes it will still be possible |
Thanks for your quick reply. From the file 'mobiles.yml', I see some devices types are detected in model regex, for an example:
And from the google ua-reduction doc, the part of Model would be reduced in user agent, so I guess, for the target devices of 'Surface Duo 2', the device-type would be detected as 'smartphone' instead of the accurate result 'tablet' with only reduced ua (without client-hints). Am I correct? If so, do we have other ways to get the accurate device-type? Thanks a lot. |
the type of device, when the brand and model of the device are unknown, is determined by several factors device-detector/DeviceDetector.php Lines 926 to 934 in 3f55f64
and further down the list. If we know the device model, we are guaranteed to return the device type. Some tablet devices may return mobile types in the useragent string, this will be inaccurate here, but there are very few such devices. (this is due to the fact that the tablet has a SIM module, and the processor is used from a mobile device, processors for phones and tablets are most often different) |
https://www.chromium.org/updates/ua-reduction/#proposed-rollout-plan
according to this information, the user-agent will be depersonalized at maximum for browsers: Chromium, Opera, YandexBrowser, Brave etc
we will need to adjust all regular expressions and abandon the pattern
BrandName ([^;)]+)(?: Build|[;)])
or set like thisBrandName ([^;)]+)(?: Build|[;)]|$)
more details https://51degrees.com/blog/countdown-to-gday-phase-5-reduced-desktop-ua
The text was updated successfully, but these errors were encountered: