-
Notifications
You must be signed in to change notification settings - Fork 498
Desktop browsers return as Other. #493
Comments
...yes. What do you think it should be doing? |
It should be saying as desktop or pc or mac, something like that, which give a more clearer image, as in other could be some older era phones also |
And it knows that it's a desktop how? And, PC is a specific model, how? The entire point of "other" is "the user agent does not include an explicit string identifying the device model, so we can't provide that device model". Desktop browsers don't do that; there's no way to determine if it's a PC, or a Mac, or a netbook, or, as you note, an older phone. The parser can only work from the information that's actually in the user agent. |
it can just simply point out that its a PC, simple |
Except the goal is to identify specific device models, not device classes, and you haven't explained how it would "simply" do this (or provided example user agents which would allow this information to be extracted, and have a problem). |
with the OS classified into device classes |
Except, again, the goal is to identify devices, not device classes, and OS is not uniformly a mapper to the actual hardware. Nor is it uniformly a mapper to a single class of hardware. |
can you point me in a direction if I want to know the device class too? |
No; there isn't a project for that that I'm aware of. It has been discussed as a future feature but we haven't started work on it yet. |
best of luck with that |
Just to add to this, if your application really needs to log some sort of device type for desktops and "Other" isn't acceptable to your users, you could make a reasonable effort by adding some simple custom logic after the UA Parser stage. Something like this may give you an acceptable output:
We have a similar issue to contend with - essentially our users don't understand the difficulties of user agent parsing, they just want to know how many Mac users VS PC users they have, so we have no choice but to try and provide that information, even if the results are spurious. Our logic is slightly more complex than this and also uses this extended set of regexes which include brand/model, which commenthol has been trying to get merged into the core for some time now. It all depends on what you need and how much work you are willing to do but as @Ironholds has said, it is impossible to tell what the desktop model is from the user agent string because the information is not supplied. |
Using the UAParser for CSharp, when useragents of different desktop browsers are presented to the parser, it correctly identifies the OS and Browser but returns 'Other' as Device type.
The text was updated successfully, but these errors were encountered: