Javascript Navigator appVersion property returns the installed version of the client web browser as well as the platform of the browser that returns the name and appVersion of Operating system platform and other runtime environments. E.g.: NT platform of windows and .Net CLR etc. Javascript navigator appVersion enables you to extract the version and name of the web browser of the client system. You can create the ActiveX objects according to the name and version of the web browser retrieved from the javascript navigator appVersion property.
navigator.appVersion
or
window.navigator.appVersion
You can also use window.navigator to access the appVersion property to get the information about name and version of the client’s web browser.
<script language="javascript" type="text/javascript">
document.write(navigator.appVersion);
</script>
Above example of appVersion property returns the different output on different browsers.
In Internet Explorer navigator.appVersion returns:
Output: 4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
.Net CLR version depends upon the installed versions of .Net frameworks on the client’s PC.
In FireFox navigator.appVersion returns:
Output: 5.0 (Windows; en-US)
In FireFox appVersion property skips the name and version of the web browser so you can’t detect the FireFox browser version using appVersion property.
In Opera navigator.appVersion property returns:
Output: 9.00 (Windows NT 5.1; U; en)
In Opera browser appVersion property skips the name of the browser thus it is also not possible to predict the name of browser through version.
To detect the browser name and version both Javascript navigator userAgent property is used.
Be the first to rate this post
Tags: javascript, javascript navigator appversion, javascript window navigator, javascript browser detection, javascript navigator object, javascript navigator properties, javascript navigator.appname, javascript navigator.appversion, javascript navigator.useragent, check cookies enabled
8/23/2008 8:51:57 PM