Comments (11)
...yes. What do you think it should be doing?
from ua-parser.
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
from ua-parser.
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.
from ua-parser.
it can just simply point out that its a PC, simple
from ua-parser.
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).
from ua-parser.
with the OS classified into device classes
from ua-parser.
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.
from ua-parser.
can you point me in a direction if I want to know the device class too?
from ua-parser.
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.
from ua-parser.
best of luck with that
from ua-parser.
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:
if($device === 'Other')
{
$device = contains($osFamily, 'mac os') ? 'Mac' : 'PC'; // Or whatever identifiers you want
}
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.
from ua-parser.
Related Issues (20)
- isMobile alternative HOT 2
- Wrong detection of Amazon Silk HOT 3
- Publish the Java Maven artifact in the maven central repository HOT 3
- ua_parser:pig
- Outlook UA strings
- Linux Mint 17.2 is reported as linux mint 17 HOT 1
- Edge Browser not detected HOT 4
- Device family is not getting parsed properly HOT 2
- Node js upgradation
- uap-lua HOT 1
- Case sensitive regex match in C# uaparser HOT 1
- used in hive udf gives IOException HOT 1
- unit test error HOT 1
- Convert the .net project to a portable project so i can target more platforms
- Tests fail in Java Directory with the lastest regexes.yaml
- Mobile BingBot detected as iPhone HOT 1
- Regex expressions for web application scanners HOT 1
- ua_dict missing data raises: exceptions.TypeError: parse_device() takes exactly 3 arguments (1 given)
- regex place holder is not working in regex_yaml HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ua-parser.