Solve various IE compatibility problems, such as IE6, IE7, IE8, IE9, IE10, and ie8ie9.

Source: Internet
Author: User

Solve various IE compatibility problems, such as IE6, IE7, IE8, IE9, IE10, and ie8ie9.
The x-ua-compatible header label is case-insensitive and must be used in the head. It must be used before the meta except the title.
1. Use a line of code to specify a specific document mode for the browser.
<Meta http-equiv = "x-ua-compatible" content = "IE = 9">
<Meta http-equiv = "x-ua-compatible" content = "IE = 8">
<Meta http-equiv = "x-ua-compatible" content = "IE = 7">
 
2. In some cases, we need to restrict the browser to parse the document to a specific version, or restrict the browser to the performance of some old versions. You can use the following method:
<Meta http-equiv = "x-ua-compatible" content = "IE = EmulateIE9">
<Meta http-equiv = "x-ua-compatible" content = "IE = EmulateIE8">
<Meta http-equiv = "x-ua-compatible" content = "IE = EmulateIE7">
 
In this way, the browser can parse in standard mode or IE5 Quirks mode.
 
3. For testing, we can also use the following statement to specify that the browser parses the page in the highest standard mode.
<Meta http-equiv = "x-ua-compatible" content = "IE = edge">
 
4. Specify multiple modes. We can use commas to separate multiple versions. In this case, the browser selects the highest version supported by the browser from this list to use the standard mode for rendering. In the following example, the standard mode of IE7 is used for rendering when IE8 is browsed, because IE9 and IE10 are not supported.
<Meta http-equiv = "x-ua-compatible" content = "IE = 7,9, 10">

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.