I am trying to detect three operating systems - Windows XP, Windows Vista, Linux.
I use the navigator.oscpu which alerts the following OS/values -
Windows XP SP3 - Windows NT 5.1
Windows Vista - Windows NT 6.0
Ubuntu 9.04 - Linux i686
I am doubtful about the number 5.1 shown for XP. Will it show 5.1 for ALL configurations or XP - (without SP2, With SP2, With SP3) ??
Is there any chance for it to show Windows NT 5.0 for Windows XP in pre-SP2 or pre-SP3 configurations?
Bottom line is - does Windows XP mean 5.1 only or any 5.x version?
If there is a better way to definitively distinguish between the three operating systems, it will be great.
Note: This is for a Firefox extension. So, cross browser compatibility of the JavaScript code is not an issue. Please don't bring up this won't work in IE stuff.