About HTTP meta's Ie = edge, chrome = 1 Description

Source: Internet
Author: User

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


On the nginx server, you only need Find \ nginx \ conf \ nginx. conf and edit it. Add the following code in the server {} area (preferably one line before the delimiter ).:


Add_header "X-UA-compatible" "Ie = edge, chrome = 1 ";

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.