0

I have a question about Javascript. I have gathered information saying that the version of Javascript being used in each browser is dependant on the actual browser.

Can someone please give me a quick list of the version of Javascript in Chrome, Firefox and IE? I have had a look online, but need a definitive answer.

asked Feb 11, 2013 at 22:28
4
  • 3
    This is not a good way to check it can do what you want; a better way is to check features (and then load shims as required, if necessary). Real example of why you shouldn't version check: WebKit will run into JavaScript 1.7 <script>s, even though it doesn't support many features of 1.7. Commented Feb 11, 2013 at 22:30
  • The version of JS in a given browser is whatever it chose to implement in a given release. It's just not tremendously useful information. The closest I can think of is Kangax' tables: kangax.github.com/es5-compat-table Commented Feb 11, 2013 at 22:33
  • All modern browsers implement EcmaScript 5. I suggest you read the spec. Commented Feb 11, 2013 at 22:35
  • In IE there's ScriptingEngine Function. Commented Feb 12, 2013 at 6:00

3 Answers 3

1

You should never need to know the version of JavaScript being run, for the same reason as you should never need to know what browser (or version thereof) is being used to view your site.

For instance, I've seen many sites say "querySelectorAll isn't supported by IE7, but you can hack it with this clever CSS"... but that still doesn't give querySelectorAll support in the many mobile devices that don't support it (the Nintendo DSi browser springs painfully to mind).

Always, always use feature-detection to see if the browser supports a particular feature. For instance,
if( !window.JSON) { /* implement your own JSON-handling functions here */}.

answered Feb 11, 2013 at 22:33
Sign up to request clarification or add additional context in comments.

Comments

0

You are correct in saying that the version of the JavaScript engine is determine by the browser, however, I have no idea why you would need to know this information.

A quick google returned this possible solution

answered Feb 11, 2013 at 22:32

Comments

0

If you really want to know which versions are used by browser JS engines, you can explore that information on Wikipedia here under the "JavaScript engines" and "Implementations" sections and see if that satisfies what you want to know. I hope this is more of an academic interest though, because as others have mentioned it is far better to check for the particular feature(s) you want to use rather than make assumptions based on browser version.

answered Feb 11, 2013 at 22:36

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.