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">