Internet Explorer 9 standards document mode enables the same markup and same
script to work across browsers. You should use Internet Explorer 9 standards
document mode to take advantage of new features in the
ECMAScript, Fifth Edition standard (ES5) and IE9’s
enhanced DOM programmability. However, to maintain fidelity with
mode, IE7 standards mode, and IE8 standards mode differs somewhat from IE9
standards mode. You can use these compatibility modes and the F12 developer
tools to migrate your site to use the new ES5 features on your own schedule,
while your site continues to run in IE9.
In two blog posts – Testing
sites with Browser Mode vs. Doc Mode and
IE’s Compatibility Features for Site Developers – Marc Silbey
explains how to take advantage of document modes in Internet Explorer 9. He
also discusses how to use Browser Mode and Document Mode to test sites for
IE9 and previous IE versions. In this post, we’ll explore what developers
in a previous post, you (the developer) control the document mode
that IE will use when rendering your site by using the DOCTYPE and
document modes. For information on how to set the document mode, see our post
IE’s Compatibility Features for Site Developers and the
Determining Document Mode diagram for IE9.
standards document mode is the default if a Web page uses a standards-compliant
DOCTYPE and doesn’t specify an X-UA-Compatible meta tag. In this mode,
ECMAScript, Fifth Edition features,
enhanced DOM programmability, and
removes some of the key
implementation and the ECMAScript, Third Edition Specification.
implement portions of the then-draft ES5 standard, such as
native JSON support and
accessor support on DOM objects. This mode also supports
changes made in IE8 to fix some key issues raised by
in IE7, including the
Microsoft extensions supported in the IE7 standards mode in
IE7 and IE8.
IE7 and IE8.
Here are three examples of code that, due to our conformance to the ES5
standard, provide different results depending upon the document mode. For
Compatibility Cookbook on MSDN, the blog post
Enhanced Scripting in IE9: ECMAScript 5 Support and More, the ES3
Standards Support document, and the
Microsoft JScript extensions to the ES3 standard.