Can IE8 Run JavaScript As IE7?

Can IE8 Run JavaScript As IE7? thumbnail
Testing for JavaScript compatibility for IE7 and IE8 can be done using document modes.

One feature of Internet Explorer 8 that web developers have come to enjoy is its ability to switch back and forth between IE7 and IE8 rendering standards. However, there are misconceptions about how IE8's compatibility modes handle JavaScript.

  1. The JScript Engine

    • While most popular browsers support JavaScript, Internet Explorer uses Microsoft's own version of ECMAScript known as JScript. IE8 launched with support for a new version of JScript that included changes to make it more standards compliant. This made it easier for programmers to write cross-browser code, but the differences between IE8's version 5.8 of JScript and IE7's version 5.7 introduced problems for programmers wanting to make their code work in both versions.

    Internet Explorer Document Modes

    • The solution Microsoft devised was to offer multiple document modes in IE8. Before rendering a page, IE8 first checks the document mode defined either by the web page or the browser. The document mode determines the rules that the browser follows. If the document mode is "IE7 Standards," for example, it emulates IE7's rendering engine and JScript engine.

    Defining a Page's Document Mode

    • A web developer may choose to define an appropriate document mode within the page itself by adding a meta tag like the following:

      <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >

    Debugging JavaScript Within IE8

    • Developers may also change the document type to test different versions of JScript interpretation by using the developer tools in IE8. Pressing F12 in IE8 will open up the developer tools and the document mode may be changed through the appropriate drop-down box.

Related Searches:

References

Comments

You May Also Like

  • Differences in IE7 and IE8

    On March 19th, 2009, the Microsoft Corporation released a new version of its popular Internet Explorer browser. The new version, Internet Explorer...

  • Ie8 ActiveX Controls Won't Install

    ActiveX is a programming framework that was developed by Microsoft to allow Web designers to incorporate interactive content into their websites. ActiveX...

  • How to Turn Javascript Off in IE8

    JavaScript is a type of scripting language needed to access certain websites on the Internet. JavaScript is enabled by default on the...

  • How to Turn on Javascript in IE

    By default, JavaScript should be enabled on Internet Explorer, the web browser that is included with all new PCs running Windows XP...

  • How Can I See If I Am Running IE8 or IE7?

    Microsoft occasionally updates Internet Explorer in response to requested features or to plug security holes. If you have Windows configured to automatically...

  • What Is the Difference Between Internet Explorer 7 and 8?

    Internet Explorer 8 (IE8) is an improvement from the previous version, Internet Explorer 7 (IE7). All the features of IE7 are present...

  • How to Enable JavaScript in IE8

    JavaScript is a type of programming language used in websites around the world. Without JavaScript enabled in your web browser, you may...

  • Differences Between IE7 and IE8

    IE7 and IE8 are versions of Microsoft's popular Web browser, Internet Explorer. IE7 was released in 2006 and IE8 in 2009. Both...

  • IE 8 Compatibility Issues

    IE 8 Compatibility Issues. Internet Explorer 8, or IE8, is an Internet browser that was released by Microsoft in 2009. According to...

Related Ads

Featured