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

Issues with <deviceCompat> #169

Open
domenic opened this issue Feb 1, 2022 · 2 comments
Open

Issues with <deviceCompat> #169

domenic opened this issue Feb 1, 2022 · 2 comments

Comments

@domenic
Copy link
Member

domenic commented Feb 1, 2022

https://compat.spec.whatwg.org/#ua-string-pattern-chrome says

<legacyMozillaVersion> (<platform>; <oscpu>) <frozenWebKitVersion> Chrome/<chromeVersion> <deviceCompat> <frozenSafariVersion>

but this gives the wrong results for <deviceCompat> being the empty string or "Mobile " (with a trailing space, like the introductory section mentions).

Safari's section has the same issue. Additionally, Safari seems to have a <deviceCompat> of Mobile/15E148, which doesn't fit the format mentioned in the introduction. Although the introduction is non-exhaustive I think it'd be good to mention a format used by a prominent mobile browser.

@domenic
Copy link
Member Author

domenic commented Feb 1, 2022

Oh, the first half of this is maybe a dupe of #167.

@miketaylr
Copy link
Member

Chrome has been since fixed to say>

"Mozilla/5.0 (<chromePlatform>) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<majorVersion>.0.0.0 <deviceCompat>Safari/537.36"

And right now the Token Reference has this to say about <deviceCompat>,

Represents the form-factor of the device. Primarily this is "Mobile ", or just the empty string, for Desktop or non-mobile devices. Some browsers have also sent token values such as "Tablet", "TV", "Mobile VR", etc., or included build information as well.

So maybe the original issues have been addressed? But I think further improvements are still possible.

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

No branches or pull requests

2 participants