Meta tag code addresses IE compatibility issues, IE6,IE7,IE8,IE9,IE10 (including 360 compatibility mode)

Source: Internet
Author: User

Recently did a project, the customer reflects, in 360 layout dislocation, remote debugging, found that the customer is using a 360 compatibility mode, but I test on my own computer is normal (compatibility mode is also normal); A simple study of the 360 compatibility mode, In 360 compatibility mode press F12 to get debugging information, after testing, found that is the red box setting of IE version is too low, mainly the document mode change document mode for a relatively high version can be resolved, here, I added the following code <meta http-equiv= " X-ua-compatible "content=" ie=edge,chrome=1 "/> This sentence: Ie=edge will force the browser to follow the latest standards to render. Chrome=1: will allow the site to be rendered on a client using the Google Chrome frame, which has no effect on unused.

<!-----------------------------------body start----------------------------------->

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.


Third, <meta http-equiv= "x-ua-compatible" content= "ie=edge,chrome=1"/> (now Baidu uses this type of writing)
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.

Meta tag code addresses IE compatibility issues, IE6,IE7,IE8,IE9,IE10 (including 360 compatibility mode)

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.