Detailed description of X-UA-Compatible compatibility mode

Source: Internet
Author: User

To minimize this risk, IE6 allows web developers to select IE to compile and display their web pages. "Quirks mode" is the default, which causes the page

It is displayed from the perspective of an earlier version of the browser, and "Standards mode" (also known as "strict mode") features the most comprehensive support for industry Standards. However

This enhanced support function must include an appropriate webpage <! DOCTYPE> command.

If a webpage does not contain <! DOCTYPE> command, IE6 will display it in quirks mode. If the webpage contains valid <! DOCTYPE> command but Browser

Unrecognized. IE6 will display it in IE6 standards mode. Because a few websites already contain <! DOCTYPE> command. The compatibility mode is switched

.

Understanding File compatibility mode

IE8 supports several file compatibility modes, which have different features and affect the way the content is displayed.

? Emulate IE8 mode indicates IE usage <! DOCTYPE> command to determine how to compile the content. The Standards mode command is displayed as IE8 Standards.

Mode and the quirks mode is displayed as IE5 mode. Unlike IE8 mode, Emulate IE8 mode emphasizes <! DOCTYPE> command.
? Emulate IE7 mode indicates IE usage <! DOCTYPE> command to determine how to compile the content. The Standards mode command is displayed as IE7 Standards.

Mode and the quirks mode is displayed as IE5 mode. Unlike IE7 mode, Emulate IE7 mode emphasizes <! DOCTYPE> command. For many web pages

This is the most recommended compatibility mode.
? The content compiled by IE5 mode is similar to the display of IE7 quirks mode, which is similar to that displayed in IE5.
? The content compiled by IE7 mode is like the display status of IE7 standards mode, regardless of whether the webpage contains <! DOCTYPE> command.

Example of Emulate IE7 mode compatibility.

The code is as follows: Copy code

<Html>
<Head>
<! -- Mimic Internet Explorer 7 -->
<Meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7"/>
<Title> My Web Page </title>
</Head>
<Body>
<P> Content goes here. </p>
</Body>
</Html>

The content changes with the specified page mode. To simulate IE7, specify IE = EmulateIE7, IE = 5, IE = 7, or IE = 8 to select one of them

Mode. You can also specify IE = edge to indicate that IE8 uses the highest mode supported by it.

The X-UA-compatible header is case-insensitive. However, apart from the title element and its meta element, it must appear in the header section of the webpage.

The previous location,


Other compatibility references

The code is as follows: Copy code
<Meta http-equiv = "X-UA-Compatible" content = "IE = 9">

The IE8 model supports many established industry standards, W3C CSS Level 2.1 specifications and

W3C Selectors API, limited support for W3C CSS Level 3 Specifications (draft) and other industry standards

The code is as follows: Copy code
<Meta http-equiv = "X-UA-Compatible" content = "IE = 8">

The IE7 mode forces the browser to render the document in IE 7 standard mode, ignoring whether or not

Define commands

The code is as follows: Copy code
<Meta http-equiv = "X-UA-Compatible" content = "IE = 7">

Emulate IE9 mode tells IE to use commands to determine if a document is rendered. Mark

IE9 rendering in quasi mode and IE5 rendering in geek mode. Unlike IE9, Emulate IE9 considers commands.

The code is as follows: Copy code
<Meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE9">

Emulate IE8 mode tells IE to use commands to determine if

Document dyeing. In standard mode, IE8 is used for rendering, and in geek mode, IE5 is used for rendering. Unlike IE8, Emulate IE8 considers commands.

The code is as follows: Copy code
<Meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE8">

Emulate IE7 mode tells IE to use commands to determine if

Document dyeing. In standard mode, IE7 is used for rendering and IE5 is used for geek mode. Unlike IE7, Emulate IE7 considers commands.

This is the preferred compatibility mode for most sites

The code is as follows: Copy code
<Meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7">

IE5 mode tells IE7 whether to render the document in geek mode

The code is as follows: Copy code
<Meta http-equiv = "X-UA-Compatible" content = "IE = 5">

Edge

The mode tells IE to render the document in the highest level mode, that is, any IE version is rendered in the highest level standard mode supported by the current version to avoid version upgrades.

Impact. Simply put, it is the standard mode rendering of any version of IE.

The code is as follows: Copy code
<Meta http-equiv = "X-UA-Compatible" content = "IE = edge">

Use the following code to force IE to use Chrome Frame rendering

The code is as follows: Copy code
<Meta http-equiv = "X-UA-Compatible" content = "chrome = 1">

Prompt IE users to install Google Frame
Google officially provides a Google Frame plugin installation check. You can call the method directly here. If IE is detected that Google is not installed

Frame.

The code is as follows: Copy code

<Script src = "http://ajax.googleapis.com/ajax/libs/chrome-

Frame/1/CFInstall. min. js "> </script> <script> CFInstall. check (); </script>

The best compatibility mode.

Type:

The code is as follows: Copy code

<Meta http-equiv = "X-UA-Compatible" content = "IE = edge, chrome = 1">

Related Article

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: info-contact@alibabacloud.com 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.