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

Older iPad not detected as tablet #33

Open
Lonzak opened this issue Dec 7, 2020 · 2 comments
Open

Older iPad not detected as tablet #33

Lonzak opened this issue Dec 7, 2020 · 2 comments

Comments

@Lonzak
Copy link

Lonzak commented Dec 7, 2020

I migrated our user agent functionality to this library. Nearly all unit tests worked except for this UA:

"Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; de-de) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5";

The user agent is not detected as a tablet but iPad qualifies as one.
This user agent or similar are listed here:
https://developers.whatismybrowser.com/useragents/explore/operating_platform/ipad/9

Sidenote:
I also ran it through browscap.org/ua-lookup and it is correctly detected as a tablet there. So it must be a problem with the java library. (Initially i also opened a bug but closed it since it is working for them.)

@paulrutter
Copy link
Contributor

Ok thanks for confirming with browscap.
We'll check this issue when we find the time to do so.

@arthurmeijer
Copy link
Collaborator

arthurmeijer commented Dec 10, 2020

The library matches a different rule than the online checker, but with the same pattern length:

mozilla/5.0*(*cpu*os* like mac os x*)*applewebkit*(*khtml*like*gecko*)*version/5.0*mobile/*safari/*
mozilla/5.0*(ipad*cpu os 4_3* like mac os x*)*applewebkit*(*khtml*like*gecko*)*version/5.0*safari/*

We should review the exact rules for comparing priority of matching rules.

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

No branches or pull requests

3 participants