Fabien Papet
Fabien Papet

Reputation: 2319

Detect full IE version in JavaScript

First of all, I am sorry if it was already asked, but I would like to know how I can detect (using JavaScript) which exact version of IE is running.

I already know window.navigator.userAgent and appVersion which returns ... MSIE 8.0 ..., but what I want is 8.0.6 or 8.0.9 (they have differences, some things that work in 8.0.9 do not work in 8.0.6).

Upvotes: 0

Views: 255

Answers (2)

Michał Lach
Michał Lach

Reputation: 1278

What about navigator.appVersion ?

http://www.w3schools.com/jsref/prop_nav_appversion.asp

However, you still may need to grab the value using regular expressions.

Upvotes: 0

PulseLab
PulseLab

Reputation: 1579

I don't think you can detect this level of granularity via javascript - browser versions are detected from the user agent, and in IE8 the user agent doesn't go down to those versions.

More info on IE8 user agent strings here: http://www.useragentstring.com/_uas_Internet%20Explorer_version_8.0.php

If there are some things that only work in certain subversions I think you may have to do some sort of feature detection test rather than trying to ascertain the actual dot-dot-version...

Upvotes: 1

Related Questions