Solved

Javascript version 1.8

Posted on 2013-06-24
6
319 Views
Last Modified: 2013-07-05
Hello,
Is it possible to identify what version the javascript is being programmed by looking at the web page source code?  I would think that knowing of a certain construct used in version 1.8 and that construct being used on that web page, that one could determine what version was being used.
Is there an easier way?

Also,
How much information can be gather from a statement like this;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

I see that the DTD is xhtml, but is there more?
0
Comment
Question by:chima
6 Comments
 
LVL 6

Expert Comment

by:Manuel Marienne-Duchêne
ID: 39273890
may be you want to talk Jquery a librairy for javascript :

http://jquery.com/
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 125 total points
ID: 39273909
You can see the version of the jQuery library in the source code of a page.  But javascript itself is part of the browser and is not generally available separately and neither is the version of it.  Current versions of javascript in browsers are based on ECMAscript.  More info here: https://en.wikipedia.org/wiki/ECMAScript
0
 
LVL 54

Assisted Solution

by:Julian Hansen
Julian Hansen earned 75 total points
ID: 39273916
I am assuming you mean JQuery not Javascript

You can check the version like so
var ver = $().jquery;
alert (ver);

Open in new window

0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 35

Assisted Solution

by:Robert Schutt
Robert Schutt earned 150 total points
ID: 39274071
Assuming you do mean javascript, seems the way to do it is to include the version in the script tag so it's clear for people (and browsers), as shown here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.8 

I'm not sure what is supposed to happen when a browser doesn't support the new version, probably ignore the entire script block.
0
 
LVL 9

Accepted Solution

by:
Sar1973 earned 150 total points
ID: 39274274
Are you looking for navigator properties? See http://www.w3schools.com/js/tryit.asp?filename=try_nav_all
0
 
LVL 54

Assisted Solution

by:Julian Hansen
Julian Hansen earned 75 total points
ID: 39274420
Having re-read your question
s it possible to identify what version the javascript is being programmed by looking at the web page source code?
Are you asking what version the author decided to use or what version is supported by the browser?
From the rest of your question it seems you are trying to work out something about the page and how it was developed.

Maybe tell us what it is you are trying to do - why you need this information - and we might be better able to help you.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question