Common JavaScript issues in the Internet Explorer.

All of us have spent many hours to reveal and fix JavaScript issues that raised errors under IE. In this article we will cover some of them.

The complete list of the IE7 / IE8 bugs, including JS interpretation flaws can be found here:

  1. IE will raise an error if the “comma” symbol exists after the last element of an array.


    var array = ["elem1", "elem2", "elem3",]

    : Remove the comma after the last element and let the browser be happy.

  2. Support of JavaScript reserved keyword const, that declares a read-only, named constant.


    const varname1 = value1;

    : const is a Mozilla-specific extension, it is not supported by IE. However Firefox 2, Safari 2, Opera 9.2x, NS 6.2, Galeon 2, Epiphany 2 all pass this test.

    : Replace the const keyword with var.

  3. MSIE does not support type=”application/ecmascript” and type=”application/javascript” in the Script tag, which meet RFC 4329.

    : <script language=”javascript” type=”application/javascript” … />

    : If you don’t care about XHTML compliance or expressiveness of your markup, it’s safe to use a plain script tag. If you do care, you should use “text/ecmascript” or “text/javascript”.


  1. Hello from Vyatka River!!! Thank you for information! It?s a good idea for next full revision…
    Write more!!! :)))

  2. Great post! Keep up the good work!

  3. Keep the awesome posting up. Thanks for this!

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>