View Full Version : identify javascript version

01-04-2007, 06:49 AM
hello, may i know what function or command will i use to determine what version of javascript that my browser (I.E.6) is CURRENTLY USING? pls note that i am NOT referring to how will i identify the versions that a browser is supporting, but if it is included in the reply..it will still be apprectiated. thanks.

01-04-2007, 08:07 AM
<script type="javascript/text">
document.write(navigator.appVersion); // Version.
document.write(navigator.appMinorVersion); // Minor version.


01-04-2007, 09:45 AM
IE runs JScript and not Javascript so there is no Javascript version. Which JScript version it is running depends as much on the operating system and service patches as it does on the browser.

http://javascript.about.com/library/bljver.htm has some deprecated code that can be used to determine what version of Javascript that browsers other than IE are using. For IE it will return a value representing the Javascript version closest to the JScript version that IE is actually running eg if IE is running JScript 5.6 the code will return 1.5 which is the closest Javascript equivalent.

01-04-2007, 09:53 AM
But to find out which is the javascript version or the closest equivalent version seems perfectly useless to me. Why to do that? I guess you should find out which are the common javascript methods for all the browsers, that means you should test for a certain javascript method and see if the browser supports it rather than to test the browser's type/version or the browser's javascript version.

After all, there is no browser which is able to follow entirely the standards (ECMAScript and DOM), so that there is of no use to test a javascript version.

01-04-2007, 09:15 PM
It is completely useless. If there were any reason why it could possibly make sense to be able to determine the Javascript version then there would be a method of obtaining that info using valid HTML and Javascript.

The only method that is able to do it was deprecated long ago and so future browsers may not even support the code needed to do it.

The only possible use for such a determination would be if gahering statistics although what use such statistics would have is another question that can probably be answered with "none".

01-15-2007, 11:12 AM
ok..ok, thanks to all of you who gave those logical explaination on the necessity of NOT getting the version of a javascript. all of your ideas were carefully noted.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum