Set compatibility [specifying the rendering mode of ie browser], and compatibility ie

Source: Internet
Author: User

Set compatibility [specifying the rendering mode of ie browser], and compatibility ie

<Meta http-equiv = "X-UA-Compatible" content = "IE = 7"/>
The above code tells IE that whether or not to use DTD to declare document standards, IE8/9 will use IE7 engine to render pages.
<Meta http-equiv = "X-UA-Compatible" content = "IE = 8"/>
The above code tells IE that IE8/9 will render the page with the IE8 engine.
<Meta http-equiv = "X-UA-Compatible" content = "edge"/>
The above code tells IE that the content is displayed in the highest version of IE in Windows.
<Meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7"/>
According to <! DOCTYPE> command to determine how to present the content. Standard mode commands are displayed in Windows Internet Explorer 7 standard mode, while Quirks mode commands are displayed in IE5 mode. Unlike IE7, EmulateIE7 follows the <! DOCTYPE> command. For most websites, it is the preferred compatibility mode. For those who use IE9/IE10, if they want to skip IE8 and specify rendering in IE7 and IE9, they must use the syntax recommended in the MSDN document:
<Meta http-equiv = "X-UA-Compatible" content = "IE = 7; IE = 9"/>
However, the above syntax compatible with IE7/IE9 will cause a BUG in IE8, and it is found that IE8 does not render the page in IE7 document mode.
Correct syntax rules:
1. When defining multiple document modes, use commas (,) instead of semicolons (;).
Supplement:
X-UA-Compatible is a newly added setting for ie8, which is not recognized by browsers other than ie8. The difference between X-UA-Compatible and content = "IE = 7" regardless of whether the page contains <! DOCTYPE> commands all use the standard mode of Windows Internet Explorer 7. The content = "IE = EmulateIE7" Mode follows <! DOCTYPE> command. For most websites, it is the preferred compatibility model.

X-UA-Compatible is a special file header tag for IE8, used to specify different page rendering modes for IE8. Due to the high utilization rate of IE6 and IE7, it is very important to enable the X-UA-Compatible compatibility mode of IE8.
Sample Code for various compatibility modes:
<Meta http-equiv = "X-UA-Compatible" content = "IE = 5"/>
For example, the Quirks mode of Windows Internet Explorer 7 is used, which is similar to that of Windows Internet Explorer 5.
<Meta http-equiv = "X-UA-Compatible" content = "IE = 7"/>
Whether or not the page contains <! The DOCTYPE> command uses the standard rendering mode of Windows Internet Explorer 7.
<Meta http-equiv = "X-UA-Compatible" content = "IE = 8"/>
The standard rendering mode of IE8 is enabled, but since the X-UA-Compatible file header only supports IE8 or later versions, it is equivalent to redundant code.
<Meta http-equiv = "X-UA-Compatible" content = "edge"/>
Edge mode notifies Windows Internet Explorer to display content in the highest available mode, which breaks the "Lock" mode.
<Meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7"/>
EmulateIE7 mode notifies Windows Internet Explorer <! DOCTYPE> command to determine how to present the content. Standard mode commands are displayed in Windows Internet Explorer 7 standard mode, while Quirks mode commands are displayed in IE5 mode. Unlike IE7, EmulateIE7 follows the <! DOCTYPE> command. For most websites, it is the preferred compatibility mode.

For more information, see: http://www.byywee.com/page/M0/S963/963631.html

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.