Today, a User-Agent string like "... Windows 7 ..." is parsed into user_agent_map['os_family'] = 'Windows 7' and user_agent_map['os_major'] = '-'.
Shouldn't it be like: user_agent_map['os_family'] = 'Windows' and user_agent_map['os_major'] = '7'?
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | None | T127324 Parse User-Agent strings with OS like "Windows 7" correctly into the user agent map {hawk} | |||
Resolved | • madhuvishy | T129672 Update UA-Parser with latest definitions | |||
Resolved | • madhuvishy | T130399 Update UA-Parser version to 1.3.0-wmf3 in refinery-source |
Event Timeline
Microsoft claims that the right User agent string for Windows 7 is something like "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)". See - https://msdn.microsoft.com/en-us/library/hh920767(v=vs.85).aspx
Windows NT 6.1 denotes Windows 7 and Windows NT 6.2 denotes Windows 8 So my guess is if a UA string has "Windows 7" in it - it is not probably not a real browser request?
However even if the string is Windows NT 6.1 or 6.2 UA parser doesn't set OS Major - and I wonder if this is expected behavior because windows OS-es have in the past been Windows ME, XP, Vista and those wouldn't be set in OS Major. So may be we shouldn't bother fixing this behavior?
@madhuvishy
This seems correct, you're right. I agree we should leave it as it is.
Nevertheless, my point was: in the case of Windows 7 it would seem logic to me to have os_family be Windows instead of Windows 7, and have os_major be 7 instead of -. I'd say that the UA parser is not taking advantage of the os_major field for Windows systems.
It will be good to take the opportunity of having looked into this to upgrade ua parser if proceeds.
We decide to use UA-parser convention which is to separate major version version of windows (like Win7, winXP, win95 for instance) into OS families.