In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
In this issue, the editor will bring you META information about how to understand IE=edge,chrome=1. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Playing HTML5 ★ Boilerplate these days, I noticed that there is a sentence in the meta message:
The code is as follows:
But what makes me curious is that there is a value like chrome after this tag here. Can IE also simulate chrome?
After a quick search, I realized that it was not Microsoft that enhanced IE, but Google made a plug-in: Google Chrome Frame (Google's embedded browser framework GCF). This plug-in can keep the user's IE browser unchanged, but when browsing the web, users actually use the Google Chrome browser kernel and support multiple versions of IE browsers such as IE6, 7, 8, and so on.
The meta tag mentioned above is used to specify that the page is rendered using the chrome kernel after GCF is installed.
GCF download address: http://code.google.com/intl/zh-CN/chrome/chromeframe/
After installation, if you want to render a page using GCF, simply add gcf: before the address of the page, for example: gcf: http://cooleep.com
But what if you want to specify that the page is rendered using GCF by default at development time, and if you don't have GCF installed and then use the IE kernel to render?
Is to use this mark.
Tag usage:
After reading the development document of chrome (http://www.chromium.org/developers/how-tos/chrome-frame-getting-started, need to turn over the wall), let's briefly explain the syntax of this tag.
Http-equiv= "X-UA-Compatible" is a special tag for IE8, which is used to specify how Internet Explorer 8 browsers simulate the rendering of a particular version of IE browser, so as to solve the compatibility problem of IE browsers.
For example, specify that the IE8 browser renders the interface in the same way that IE6 renders.
Code that used to simulate IE7 rendering commonly used by css hacker:
The code is as follows:
What makes me curious is the paragraph "content=" IE=edge,chrome=1 "in the code mentioned in the first paragraph of the article, which literally means to specify how IE uses chrome to render. Or let IE's skin use the background Chrome kernel?
Check it out, this is a Google Chrome Frame "Google Chrome browser embedded framework-GCF" developed by Google. Using GCF allows the user's IE browser to look the same, but the user actually uses the Chrome kernel when browsing the web and supports IE6/7/8 for Windows XP and above.
The code mentioned in the first paragraph specifies that the page uses the Chrome kernel for rendering, provided that the user already has Google Chrome Frame installed.
The official definition of it:
■ can be started immediately using open network technologies such as HTML5 canvas tagging, even technologies that are not yet supported by Internet Explorer 6, 7, or 8.
■ leverages JavaScript performance enhancements to make applications faster and more responsive.
So this code can be interpreted as: if GCF is installed, GCF is used to render the page "chrome=1", and if GCF is not installed, the highest version of the IE kernel is used to render "IE=edge".
However, the next problem arises, under w3.org 's html5 verification tool:
It is easy to solve this problem. For the three mainstream servers, we can configure http equiv rules on the server side:
Apache server, make sure that mod_headers and mod_setenvif are available, and then add the following rules in httpd.conf "the configuration file of the new Apache is apache2.conf" or in .htaccess:
The code is as follows:
BrowserMatch chromeframe gcf
Header append X-UA-Compatible "chrome=1" env=gcf
Windows Server in IIS7 or later servers, you only need to modify the web.config file and add the following information:
The code is as follows:
In the Nginx server, all you need to do is find the ginxconf ginx.conf and edit it, and add the following code to the server {} area (preferably a line before the closure):
The code is as follows:
Add_header "X-UA-Compatible"IE=Edge, chrome=1"
The above is the META information shared by the editor on how to understand IE=edge,chrome=1. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.