Skip to content
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

Use Client Hints Sec-CH-UA-Mobile header to detect mobile #962

Open
wants to merge 1 commit into
base: 4.8.x
Choose a base branch
from

Conversation

kevinkimball
Copy link

Chrome now sends Client Hint headers and a frozen UA string in newer versions. See this post for a full explanation:
https://developer.chrome.com/docs/privacy-security/user-agent-client-hints

Sec-CH-UA-Mobile specifically is a "low-entropy hint" which means it is sent with every request. See:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-UA-Platform

This partially resolves the issue in #906 although I didn't do anything with tablet detection.

Copy link

@digifa digifa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would approve this, even it is a partial fix for identifying mobile devices and does not separate between phones and tablets.
Generic identifying a tablet is more difficult as there are more indicators - next step should be to identify Tablets by known model name in Sec-CH-UA-Model Header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants