<
meta
http-equiv
=
"X-UA-Compatible"
content
=
"IE=edge,chrome=1"
/>
Introduction:
This is a dedicated identifier of IE8. It is used to specify the IE8 browser to simulate the rendering mode of a specific version of IE browser (such as IE6), to solve some compatibility problems, for example, the method for simulating IE7 is as follows:
<
meta
http-equiv
=
"X-UA-Compatible"
content
=
"IE=EmulateIE7"
/>
But I'm curious that there is a value like chrome after this mark. Can ie simulate chrome?
After a quick search, I realized that Microsoft did not enhance IE, but Google made a plug-in: Google Chrome frame (Google embedded browser framework GCF ). This plug-in keeps your IE browser unchanged. However, when you browse the Web page, you actually use the Google Chrome browser kernel and support multiple ie browsers, such as IE6, 7, and 8, google is a really powerful tool!
The meta tag mentioned above is used to specify the page to use the chrome kernel for rendering after GCF is installed.
GCF: http://code.google.com/intl/zh-CN/chrome/chromeframe/
After the installation is complete, if you want to use GCF to render a page, just add GCF: Before the address of the page, for example: GCF: http://cooleep.com
However, if you want to specify that the page is first rendered using GCF by default during development, what should you do if you do not install GCF and then use the IE kernel for rendering?
This tag is used.
Tag usage:
I have read the chrome development documentation (http://www.chromium.org/javass/how-tos/chrome-frame-getting-started, and need to go over the wall). the syntax of this tag is described below.
1. Basic usage: Add a header to the page
<
meta
http-equiv
=
"X-UA-Compatible"
content
=
"chrome=1"
>
It is used to declare that the current page is rendered using the chrome kernel.
The complexity is the usage in the beginning of this article:
<
meta
http-equiv
=
"X-UA-Compatible"
content
=
"IE=edge,chrome=1"
/>
In this way, if GCF is installed, GCF is used to render the page. If GCF is installed, the highest version of IE kernel is used for rendering.
2. Modify the HTTP header file to make the specified page render using the GCF kernel:
Add the following information to the HTTP header file: X-UA-compatible: chrome = 1
On the Apache server, make sure that the mod_headers and mod_setenvif files are available and add the following configuration information to httpd. conf:
<
IfModule
mod_setenvif.c>
<
IfModule
mod_headers.c>
BrowserMatch chromeframe gcf
Header append X-UA-Compatible "chrome=1" env=gcf
</
IfModule
>
</
IfModule
>
On iis7 or a later server, you only need to modify the Web. config file and add the following information:
<
configuration
>
<
system.webServer
>
<
httpProtocol
>
<
customHeaders
>
<
add
name
=
"X-UA-Compatible"
value
=
"chrome=1"
/>
</
customHeaders
>
</
httpProtocol
>
</
system.webServer
>
</
configuration
>