In no way is browser compatibility on the Internet limited just to compliance with the latest web standards, since there is content on the World Wide Web that will not play nice with the latest iterations of Internet Explorer, Firefox, Opera, Chrome, etc. Backwards compatibility is, in this regard, a critical aspect of having next-generation browsers not break the web. For Microsoft, not breaking the web with upcoming versions of IE has become one of the key goals of the development process, especially as, given IE’s dominance, many websites were built for the company’s proprietary browser.
“As IE changes and supports new technologies, developers will still want, in some scenarios, IE’s legacy behavior. There are many different technologies that enable developers to adjust how IE runs their site’s markup. The main ones include the IE Developer Tool’s Browser Mode and Document Mode, X-UA-Compatible Meta tag and HTTP Header, and Conditional Comments,” Marc Silbey, IE program manager, revealed.
Setting the Browser Mode means that developers can control the User-Agent (UA) string IE sends to servers, but also the Document Mode the browser uses by default, and even how Conditional Comments are evaluated. Devs already familiar with IE8 know that the browser version uses IE8 standards as the default browser mode. The same will be valid for IE9, with Internet Explorer 9 being the default. The IE’s Developer Tools allow for this particular detail to be altered by changing the “Browser Mode:” menu item. At the same time, users can click on the Compatibility View button in order to achieve the same result.
According to Microsoft, Internet Explorer 9 can use the following browser modes:
“- IE9 - IE9 reports a UA string, version vector, and document mode to match the default browser behavior, which is the most standards-compliant mode in IE9. Use this mode to test how IE9 users experience your site.
“- IE9 Compatibility View - IE9 reports a UA string, version vector, and document mode, as if it is IE7; however, the UA string also includes the Trident/5.0 token indicating that the browser is really IE9. Use this mode to test how IE9 users experience your site if they click on the Compatibility View button. Note that the Developer Tools in the second IE9 Platform Preview has two Compatibility View options, which is a known issue.
“- IE8 - IE9 reports a UA string, version vector, and document mode as if it is IE8. Use this mode to test how IE8 users experience your site.
“- IE7 - IE9 reports a UA string, version vector, and document mode as if it is IE7. Use this mode to test how IE7 users experience your site.”
Internet Explorer 9 also comes with a few different Document Modes. The Document Mode in IE is designed to tell the browser’s Trident engine how exactly to render the markup. In this regard, once it is in play, the Document Mode works without involving the UA string or grabbing new markup from the server.
IE9 comes with the following Document Mode alternatives:
“- IE9 Standards - This is the latest standards-compliant behavior available in IE9, and is the default mode used by IE9 to render a webpage that have a strict or unknown document type.
“- IE8 Standards - This behavior matches IE8 when it renders a webpage that has a strict or unknown doctype.
“- IE7 Standards - This behavior matches IE7 when it renders a webpage that has a strict or unknown doctype.
“- Quirks - This behavior matches IE when rendering a document with no doctype or a Quirks doctype. It is similar to the behavior of IE5 and the Quirks mode behavior of IE6, IE7 and IE8.”
Website developers can also control the manner in which IE9 will render their websites. Microsoft is allowing sites to change the IE9 default mode through the doctype and X-UA-Compatible Meta tag or HTTP Header. The software giant recommends using the Meta tag for single pages, and the HTTP Header for larger portions of a certain website. At the same time, there’s always the option for developers to leverage feature and behavior detection.
Microsoft notes that it prefers developers to detect the features that are available to them rather than browsers, and to treat IE9 just as the latest iterations of Firefox, Opera, Chrome, etc. Still, despite this, the Redmond company will continue to support Conditional Comments.
“Here are a few rules that will help you apply Conditional Comments: Conditional Comments are tied to the UA String by default. Using the X-UA-Compatible meta tag or HTTP header enables a page to specify a specific version for compatibility. If an X-UA-Compatible declaration exceeds the version of IE in use (8 in IE8, 9 in IE9) or is less than 7, then the value from the UA String will continue to be used instead of the version declared in X-UA-Compatible value. The IE version number sent in the UA String is used to evaluate Conditional Comments. This is called the Version Vector. For example, an IE7 UA String will have a Version Vector of 7 and the Conditional Comment <!--[if IE 7]> will evaluate to true. IE9 will only send one of two UA Strings; the IE9 string or the Compat View string,” Silbey added.
Internet Explorer 9 (IE9) Platform Preview 2 Build 1.9.7766.6000 is available for download here.
IE9, IE8, IE7, IE6 and IE5 Compatibility Features
Internet Explorer 9 will play nice with legacy websites
... so hot right now