<meta http-equiv= "x-ua-compatible" content= "ie=edge,chrome=1" >

Source: Internet
Author: User

Reproduced, this basic knowledge http://www.cnblogs.com/yoosou/archive/2012/07/27/2612443.html

x-ua-compatible used to specify the model for IE browser to parse the compiled page  X-ua-compatible header label case insensitive, must be used in head and must be used before other meta except title. 1. Use a line of code to specify that the browser uses a specific document mode. <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 limit the browser's resolution of the document to a specific version, or limit the browser to some older versions of the performance. You can do this in the following ways: <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" > Using this notation, The browser either uses standard mode for parsing, or uses IE5 Quirks mode for parsing. 3, in order to test, we can also use the following statement to specify the browser according to the highest standard mode parsing page. <meta http-equiv= "x-ua-compatible" content= "Ie=edge" > 4, multiple mode designations. We can split multiple versions with commas, in which case the browser chooses from this list the highest version he supports to render using standard mode. As the following example, when IE8 is browsed, it will be rendered using IE7 's standard mode, because he does not natively support IE9 and IE10. <meta http-equiv= "x-ua-compatible" content= "ie=7,9,10" >

A line of code to solve various IE compatibility problems, IE6,IE7,IE8,IE9,IE10

2012-04-25 16:29:04| Category: Learning | font Size Subscription
In the development of the Web site because of a variety of compatibility problems, for compatibility issues, in fact, IE gives a solution Google also gives a solution

Baidu also applied this program to solve the compatibility problem of IE

Baidu source code is as follows

<! Doctype html>
<meta http-equiv=content-type content= "text/html;charset=utf-8″>
<meta http-equiv=x-ua-compatible content=ie=emulateie7>
<title> Baidu a bit, you know </title>
<script>var wpo={start:new date*1,pid:109,page: ' Superpage '}</script>
<meta http-equiv=x-ua-compatible content=ie=emulateie7>

Can open Baidu, right-click to see the source! We can look at the file header if there is such a line of code!

The meaning of this sentence is to force the use of IE7 mode to parse the page code!

Here to send a few IE usage mode!

<meta http-equiv= "x-ua-compatible" content= "ie=8″>
2. Google Chrome frame also allows IE to use Chrome's engine:

<meta http-equiv= "x-ua-compatible" content= "chrome=1″/>
3. Force IE8 to use IE7 mode to parse

<meta http-equiv= "x-ua-compatible" content= "Ie=emulateie7″><!–ie7 mode–>
Or
<meta http-equiv= "x-ua-compatible" content= "Ie=7″><!–ie7 mode–>
4. Force IE8 to use IE6 or IE5 mode to parse

<meta http-equiv= "x-ua-compatible" content= "Ie=6″><!–ie6 mode–>

<meta http-equiv= "x-ua-compatible" content= "Ie=5″><!–ie5 mode–>
5. If a specific version of IE support requires more than one compatibility mode, such as:

<meta http-equiv= "x-ua-compatible" content= "ie=5; Ie=8″/>
Two. Set the site server to specify the default compatibility mode

If the server is itself, you can define a custom header on the server to preset a specific file compatibility mode for their site. This particular method depends on your Web server.

Input, the following Web. config file enables Microsoft Internet information Services (IIS) to define a custom header to automatically compile all pages using IE7 mode.

There's another solution, like Google's

Ie7–js is a JavaScript library (the JS library that solves the conflict between IE and the Web Standard), making Microsoft's Internet Explorer behave like a website-compliant browser, supporting more standards and supporting CSS2, CSS3 selectors. It fixes a number of HTML and CSS issues and makes transparent PNG appear correctly in IE5, IE6.

Make IE5,IE6 compatible to IE7 mode (recommended)

<!–[if LT IE 7]>
<script src= "http://ie7-js.googlecode.com/svn/version/2.0 (Beta)/ie7.js" type= "Text/javascript" ></script >
<! [endif]–>
Make IE5,IE6,IE7 compatible to IE8 mode

<!–[if LT IE 8]>
<script src= "http://ie7-js.googlecode.com/svn/version/2.0 (Beta)/ie8.js" type= "Text/javascript" ></script >
<! [endif]–>
Make IE5,IE6,IE7,IE8 compatible to IE9 mode

<!–[if LT IE 9]>
<script src= "http://ie7-js.googlecode.com/svn/version/2.1 (beta4)/ie9.js" ></script>
<! [endif]–>
Resolving PNG display issues

Just name the transparent PNG image *-trans.png

It is important to note that this method has no effect on background tiling (background-repeat) and background (background-position) and fills the entire container by default.

Reprint: http://hi.baidu.com/myplan/blog/item/cdb09dfa1fa748a99f514626.html


Third, <meta http-equiv= "x-ua-compatible" content= "ie=edge,chrome=1"/>
Create HTML5 when found such a sentence, do not know what the meaning of Baidu as follows:
The effect of this writing is that if the GCF is installed, a GCF is used to render the page, and if the GCF is not installed, the highest version of the IE kernel is used for rendering. Google Chrome frame (google embedded browser framework GCF). This plugin can keep the user's IE browser intact, but when users are browsing the web, they are actually using the Google Chrome kernel, and support IE6, 7, 8 and many other versions of IE browser.
http://blog.csdn.net/abxn2002/article/details/7312459

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