TOC PREV NEXT INDEX

domref



window.navigator.appVersion


Returns the version of the browser as a string.

Syntax

ver = window.navigator.appVersion
 

Parameters

ver is the version number of the browser as a string.

Example

if ( navigator.appVersion.charAt(0) == "5" ) {
 
    // browser is putatively a v5 browser
 
}
 

Notes

The window.navigator.userAgent property also contains the version number (example: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape 6/6.1"), but you should be aware of how easy it is to change the user agent string and "spoof" other browsers, platforms, or user agents, and also how cavalier the browser vendor themselves are with these properties.

The window.navigator.appVersion and window.navigator.userAgent properties are quite often used in "browser sniffing" code: scripts that attempt to find out what kind of browser you are using and adjust pages accordingly.

Specification

DOM Level 0. Not part of specification.
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX