473,224 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

How do you find out what version of JavaScript your browser supports?

How do you find out what version of JavaScript your browser supports?
Is there a JavaScript function that will tell you?

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003
Jul 20 '05 #1
5 3029
wylbur37 <wy************@yahoo.com> writes:
How do you find out what version of JavaScript your browser supports?
You don't.

Technically, only Netscape's browsers supports a "version of
JavaScript", since they are the ones defining the JavaScript
versions. The versions are summarized here:
<URL:http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/preface.html#1003515>

Microsoft browsers have different versions of JScript, which is mostly
compatible with Netscape's JavaScript. They use their own version
numbers.
<URL:http://msdn.microsoft.com/library/en-us/script56/html/js56jsoriversioninformation.asp>

Other browsers implement their version of ECMAScript + DOM and call it
Javascript, e.g., Opera. They have no version numbers for the Javascript,
it just evolves with the browser.
The core language is pretty fixed by now, as everybody are
implementing ECMAScript v3. The differences are in the interface to
the browser and document, i.e., the DOM.
Is there a JavaScript function that will tell you?


No.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
It's worth looking at the version info in the property sheet for
C:\WINDOWS\SYSTEM32/jscript.dll

--
######################
## PH, London ##
######################
Lasse Reichstein Nielsen wrote:
wylbur37 <wy************@yahoo.com> writes:
How do you find out what version of JavaScript your browser supports?
You don't.

Technically, only Netscape's browsers supports a "version of
JavaScript", since they are the ones defining the JavaScript
versions. The versions are summarized here:

<URL:http://devedge.netscape.com/library/...pt/1.5/referen
ce/preface.html#1003515>
Microsoft browsers have different versions of JScript, which is mostly
compatible with Netscape's JavaScript. They use their own version
numbers.
<URL:http://msdn.microsoft.com/library/en...6jsoriversioni
nformation.asp>
Other browsers implement their version of ECMAScript + DOM and call it
Javascript, e.g., Opera. They have no version numbers for the
Javascript, it just evolves with the browser.
The core language is pretty fixed by now, as everybody are
implementing ECMAScript v3. The differences are in the interface to
the browser and document, i.e., the DOM.
Is there a JavaScript function that will tell you?


No.

/L

Jul 20 '05 #3
wylbur37 hu kiteb:
How do you find out what version of JavaScript your browser supports?
Is there a JavaScript function that will tell you?


The best approach is to test within your script for the presence of the
fucntion you want to use, rather than testing for a version number. In
other words, test for what it can do, rather than for what it says it
can do.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #4
I agree that doing object detection is usually better than using
version detection.

However, in answer to the original question, you could declare a
variable and then test for increasing versions of javascript such as
this:

<script language="javascript1.1">
<!--
var jsver = 1.1
// -->
</script>
<script language="javascript1.2">
<!--
jsver = 1.2
// -->
</script>
[and on and on until Nth version of javascript...]

Whatever "jsver" is at the end is your highest version CLAIMED to be
understood.

Holden
Jul 20 '05 #5
Holden Caulfield wrote:
I agree that doing object detection is usually better than using
version detection.
You bet! http://pointedears.de.vu/scripts/test/whatami
However, in answer to the original question, you could declare a
variable and then test for increasing versions of javascript such as
this:

<script language="javascript1.1">
<!--
var jsver = 1.1
// -->
</script>
<script language="javascript1.2">
<!--
jsver = 1.2
// -->
</script>
[and on and on until Nth version of javascript...]

Whatever "jsver" is at the end is your highest version CLAIMED to be
understood.


I have misguidedly used that years ago. And now -- what should it be
good for if not reliable? It is exactly the wrong way and thus returns
the wrong results. For example, IE 6.0 SP-1 on Win2k claims to support
JavaScript 1.5 but it does not support (not even with updated JScript
engine) core features specified there and in ECMAScript 3. Besides, the
above is invalid HTML 4 as the type attribute is missing, and it will
not validate as HTML 4.01/XHTML 1.0 Strict as the "language" attribute
is deprecated. OTOH, it is unlikely that you get a result even near to
truth if you use both the "language" and the "type" attribute.
PointedEars
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: R. Smits | last post by:
I've have got this script, the only thing I want to be changed is the first part. It has to detect IE version 6 instead of just "Microsoft Internet Explorer". Can somebody help me out? I tried...
5
by: Christian Ista | last post by:
Hi, Is it possible to check if the javascript is turn on on the browser (IE, firefox, ...)? Thanks, Christian,
13
by: Alex Molochnikov | last post by:
Is there any way to find out programmatically if Javascript is supported/enabled in a browser? By "programmatically" I mean on the Java servlet side. TIA Alex Molochnikov Gestalt Corporation
5
by: Andy | last post by:
Hi, I'm trying to use javascript to detect the version of internet explorer before running an active x control. I'm after the full version number (eg not just IE6 but 6.0.2800.1106). Is there...
4
by: Java Guy | last post by:
I can find a lot of stuff on the internet about javascript, except how to I determine which version my IE6 is compatible with, or where to download javascript plugin/engine/what-ever for Windows...
5
by: Mufasa | last post by:
We want to keep track of what OS/Browser people are using for our website. How can I find that out so that I can write it to a DB ? I know how to get it into the DB; I just need to know how to get...
5
by: YaoBao | last post by:
Is any ColdFusion script I can put on my webpage that will create a search bar so people can type keywords to match it on the current page in my website? It will be exactly like the finder search bar...
4
by: Ty | last post by:
Hello all, I am creating a web site with Visual Stuido 2008. I am trying to use a java script file to create a busybox for login from this page http://blogs.crsw.com/mark/articles/642.aspx. I...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.