How can I detect the browser version with JS?
I need to detect the OS version with JS not jus开发者_高级运维t the OS type.
Is this possible?
My navigator.userAgent in Firefox shows :
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6"
In chrome:
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.86 Safari/533.4"
In IE8:
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.6
So apparently for my particular OS/Browsers combination is possible, but I would not really count on that working everywhere.
精彩评论