Cata
Cata

Reputation: 1

How can I detect the browser version with JS?

I need to detect the OS version with JS not just the OS type.

Is this possible?

Upvotes: 0

Views: 507

Answers (1)

Francisco Soto
Francisco Soto

Reputation: 10392

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.

Upvotes: 2

Related Questions