Defines document compatibility. the browser is compatible with various versions and documents.

Source: Internet
Author: User

Defines document compatibility. the browser is compatible with various versions and documents.

To help ensure a consistent appearance of your web page in future Internet Explorer versions, Internet Explorer 8 introduces document compatibility. Document compatibility is an extension of the compatibility mode introduced in Microsoft Internet Explorer 6. You can select Internet Explorer to display the specific rendering mode of a webpage.

This article describes the necessity of document compatibility, lists the document compatibility modes available for recent Internet Explorer versions, and shows how to select a specific compatibility mode.

Understand the necessity of document compatibility

In each major version of Internet Explorer, some features are added to make the browser easier to use, improve security, and more closely support industry standards. As Internet Explorer becomes more available, an earlier website may not be displayed normally.

To minimize this risk, Internet Explorer 6 allows Web developers to use Internet Explorer to interpret and display their Web pages. The default value is "Quirks mode". In this mode, the webpage is displayed by using an older browser version. The "standard mode" (also known as the "strict mode") is characterized by providing the maximum support for industry standards. However, to use this enhanced support, the webpage should include appropriate <! DOCTYPE> command.

If a site does not include <! DOCTYPE> command, Internet Explorer 6 displays the site in Quirks mode. If a website contains a website that cannot be identified by a browser, <! DOCTYPE> command, Internet Explorer 6 displays the site in Internet Explorer 6 standard mode. Because it already contains <! DOCTYPE> commands have very few sites, so the compatibility mode switch is extremely successful. In this way, Web developers can select the best time to migrate their sites to the standard mode.

Over time, many sites began to rely on the standard mode. These sites also begin to use Internet Explorer 6 features and behavior to detect Internet Explorer. For example, Internet Explorer 6 does not support generic selector (which may be an English webpage), and some websites use this as a method for Internet Explorer to provide specific content.

Internet Explorer 7 provides new features such as general selector support to support industry standards in a more comprehensive manner. Because <! DOCTYPE> commands only support Quirks mode and standard mode. Therefore, Internet Explorer 7 standard mode replaces Internet Explorer 6 standard mode.

As a result, sites that rely on Internet Explorer 6 standard mode behavior (such as lack of support for General selector) will not be able to detect the new version of the browser. Therefore, content specific to Internet Explorer is not provided to Internet Explorer 7, and these sites are not displayed as expected. Because Internet Explorer 7 supports only two compatibility modes, it forces owners of affected sites to update their sites to support Internet Explorer 7.

Compared with any earlier browser versions, Internet Explorer 8 provides closer support for industry standards. Therefore, Websites designed for earlier versions of browsers may not be displayed as expected. To help mitigate any problems, Internet Explorer 8 introduces the concept of document compatibility, allowing you to specify the version of Internet Explorer supported by the site. New modes are added to Internet Explorer 8 for document compatibility. These modes tell the browser how to interpret and present the website. If your site cannot be correctly displayed in Internet Explorer 8, you can update the site to support the latest Web standards (preferred ), you can also force Internet Explorer 8 to display the content by viewing the site in the browser of the old version. You can use the meta element to add the X-UA-Compatible header to the webpage.

This allows you to select when to update the site to support new features supported by Internet Explorer 8.

For more information, see ^ _ ^;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.