Search code examples
javascriptinternet-explorerinternet-explorer-8browser-detection

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).


Solution

  • 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...