Answers
Dec 02, 2009 - 11:42 PM
I reality, of course, it's more or less possible to keep up to date with what different browsers report, hence your request for an updated detection routine.
At the same time I was thinking that the object you refer to is called BrowserCapabilities which implies that you might not always be as interested in make and model of a specific browser, but of the capabilities of that browser, which is an entirely different thing.
In your case I'm sure you have a reason to want to know the exact browser and OS, and I would like to hear what that reason might be.
Thanks, and I hope you find your answer!
Jakob
Jan 18, 2010 - 02:47 AM
The Quomon Team
Jun 02, 2012 - 12:44 PM
var OSName="Unknown OS";
var OS = navigator.appVersion;
if (!ie)
{
//document.write("THIS IS NOT IE");
OS = navigator.userAgent;
}
if (OS.indexOf("Win")!=-1) {
if ((OS.indexOf("Windows NT 5.1")!=-1) || (OS.indexOf("Windows XP")!=-1))
OSName="Win XP";
else if ((OS.indexOf("Windows NT 7.0")!=-1))
OSName="Win 7";
else if ((OS.indexOf("Windows NT 6.0")!=-1))
OSName="Win Vista/Server 08";
else if (OS.indexOf("Windows ME")!=-1)
OSName="Win ME";
else if ((OS.indexOf("Windows NT 4.0")!=-1) || (OS.indexOf("WinNT4.0")!=-1) || (OS.indexOf("WinNT")!=-1))
OSName="Win NT";
else if ((OS.indexOf("Windows NT 5.2")!=-1))
OSName="Win Server 03";
else if ((OS.indexOf("Windows NT 5.0")!=-1) || (OS.indexOf("Windows 2000")!=-1))
OSName="Win 2000";
else if ((OS.indexOf("Windows 98")!=-1) || (OS.indexOf("Win98")!=-1))
OSName="Win 98";
else if ((OS.indexOf("Windows 95")!=-1) || (OS.indexOf("Win95")!=-1) || (OS.indexOf("Windows_95")!=-1))
OSName="Win 95";
else if ((OS.indexOf("Win16")!=-1))
OSName="Win 3.1";
else
OSName="Win Ver. Unknown";
if (OS.indexOf("WOW64")!=-1) OSName=OSName+"(x64)"
else OSName=OSName+"(x32)"
}
else if (OS.indexOf("Mac")!=-1) OSName="MacOS";
else if (OS.indexOf("X11")!=-1) OSName="UNIX";
else if (OS.indexOf("Linux")!=-1) OSName="Linux";
Add New Comment