Export (0) Print
Expand All

Testing Browser and Document Compatibility Modes with the Developer Tools

New for Windows Internet Explorer 8

The Developer Tools enable you to test how users experience your Web page in different Internet Explorer versions, as well as how different document compatibility modes affect the behavior of your Web page in Internet Explorer 8. This allows quick resolution of compatibility problems before your users encounter them.

Testing Web Pages in Different Internet Explorer Versions

Internet Explorer reports three properties, commonly used by servers and webpages to determine the browser version:

Property Description
User Agent String The value that Internet Explorer sends to Web servers to identify itself. For more information about User Agent String, read the article Understanding User-Agent Strings.
Version Vector The value used in conditional commenting, which can also be used to affect Cascading Style Sheets (CSS), markup, and script blocks. For more information on conditional commenting and Version Vector, read the articleAbout Conditional Comments.
Document Mode The value used to determine whether Internet Explorer uses the most recent behavior for CSS, Document Object Model (DOM), and Microsoft JScript operations, or emulates a previous version of Internet Explorer for compatibility.

By modifying these three properties, Internet Explorer 8 can mimic different modes, such as Internet Explorer 8 Compatibility View and Internet Explorer 7. On the Developer Tools menu bar, the Browser Mode offers these options for configuring the properties listed in the table above:

Browser Mode Description
Internet Explorer 7 In this mode, Internet Explorer 8 reports a user agent, version vector, and document mode as if it is Internet Explorer 7. Use this mode to test how Internet Explorer 7 users experience your site.
Internet Explorer 8 In this mode, Internet Explorer 8 reports a user agent, version vector, and document mode to match the default browser behavior, which is the most standards-compliant mode in Internet Explorer 8. Use this mode to test how Internet Explorer 8 users experience your Web site.
Internet Explorer 8 Compatibility View In this mode, Internet Explorer 8 reports version vector, document mode, and user agent string as if it is Internet Explorer 7; however, the user agent string also includes a token indicating that the browser is really Internet Explorer 8. Use this mode to test how Internet Explorer 8 users experience your Web site if they choose the Compatibility View option in Internet Explorer. For more information, read the articlesIntroducing Compatibility View World Wide Web link and Defining Document Compatibility.
Note  Similar to other changes made with the developer tools, changing the Browser Mode is temporary and does not affect the underlying source of a Web page. A selected mode will remain in effect for a browser tab until another mode is chosen or the tab is closed.

Testing Web Pages in Different Document Modes

While the Browser Mode affects how Internet Explorer reports version information to servers and webpages, the Document Mode affects the document compatibility mode reported by the Web page to Internet Explorer.

As discussed in Defining Document Compatibility, Internet Explorer 8 introduces the concept of document compatibility, which controls how the browser interprets and displays Web pages. Web pages can indicate which document mode the page should render in to create the best experience for users. Web pages do this through DOCTYPE elements, HTTP response headers, and a META tag on the page.

The Developer Tools allow you to dynamically choose the document compatibility mode used to display a Web page without making changes to your server or Web page source. You can thus quickly identify differences in your Web page among the various document compatibility modes, and discover the most appropriate document compatibility mode for the Web page.

To change the document compatibility mode for a particular Web page, click Document Mode in the Developer Tools menu. While this option defines how the Web page reports document compatibility information to Internet Explorer, it has no effect on how Internet Explorer reports its version through the version vector or user agent string.

The Developer Tools menu also indicates the default compatibility mode for the current Web page by appending (Page Default) to that menu item.

The Document Mode offers three options:

Document Mode Description
Quirks Mode This behavior matches that of Internet Explorer when rendering a document with no doctype or a Quirks doctype. It's similar to the behavior of Microsoft Internet Explorer 5 and the Quirks mode behavior of Internet Explorer 6, and the same as the Quirks mode of Internet Explorer 7.
Internet Explorer 7 Standards This behavior matches that of Internet Explorer 7 when it renders a document that has a strict or unknown type.
Internet Explorer 8 Standards This is the latest standards-compliant behavior available in Internet Explorer 8, and is the default mode used by Internet Explorer 8 to render documents that have a strict or unknown document type.
Note  Similar to other changes made with the developer tools, changing the Document Mode is temporary and does not affect the underlying source of a Web page. A selected mode will remain in effect for a browser tab until another mode is chosen or the tab is closed.

Related Topics

Community Additions

Show:
© 2014 Microsoft