IE embedded Google Chrome frame to solve browser compatibility issues

Source: Internet
Author: User

Reference documents:

http://www.pseudowired.com/2012/12/04/tomcat-http-header-manipulation/(automatically add the header using Chrome in HTML)

Http://www.baike.com/wiki/Google+Chrome+Frame (Introduction to Google Chrome Frame)

Http://www.cnblogs.com/Libra/archive/2009/03/24/1420731.html

Project background:

We use Highcharts and svg -related content in our projects, so ask for at least IE9, or use Firefox, Chrome and other browsers. But the customer is the state-owned enterprise, they use the Windows comes with the browser, generally is IE7 and IE8, some even is the Windows XP comes with the IE6, lets the person feel the breakdown.

At that time, it is recommended that customers upgrade IE version, upgrade to at least IE9, but their OA system support only IE7 and IE8, such things really have, my own company is such a son. So the proposed escalation was negatived.

Customers are then advised to download chrome, but customers say that many of them are not able to access the extranet, and that the leaders are too bothered to download the browser.

Helpless execution I can only choose the following solutions

Solution: Browser judgment

Make browser judgments on Web pages, if the browser version is less than <=IE8, jump to the page, go to download chrome or download Google Chrome frame page

<script type= "Text/javascript" >$ (document). Ready (function () {    var bro=$.browser;    var binfo= "";    if (Bro.msie)     {        binfo= "Microsoft Internet Explorer" +bro.version;        if (eval (parseint ($.browser.version)) <9)        {              //alert (binfo);               location.href= './browser.html '        }              }    if (Bro.mozilla)     {        binfo= "Mozilla Firefox" + bro.version;    }    if (Bro.safari)    {        binfo= "Apple Safari" +bro.version;    }    if (Bro.opera)     {        binfo= "opera" +bro.version;    }   alert (binfo);}) </script>
Introduction to Google Chrome Frame

In the literature 2 kinds we can roughly know what Google Chrome frame is. Google Chrome Frame, officially the official Chinese name is "Google browser embedded framework." Google Chrome frame is a free Internet Explorer plug-in that Google has launched. using this plugin, users can browse the Web page in the Chrome kernel rendering via the Internet Explorer user Interface . After running the plugin, IE will get Chrome's performance and functionality. It will use Chrome's WebKit engine to process Web pages, as well as other technologies such as HTML5 that IE does not have.

is actually a kind of vinegar (IE) sells the dog meat (Chrome) The thing, or is the wolf which wears the sheepskin. But we just need the wolf to solve the problem for us.

But we found after installing this plugin, we use IE browser to open our web page, or to me to jump to the download browser interface, I use ALTER debugging on the homepage, judging the current browser discovery or IE8. Later I knew if IE enabled Chrome core There are two ways: (in document 2)

    1. Modify the registry, ie all use the chrome core from now on. (Not in line with business needs, customers also expect to use IE8 to access their OA)
    2. Add a x-ua-compatible-like label to your Web page and proactively let IE use call chrome core. (That's what we need now)
<meta http-equiv= "x-ua-compatible" content= "chrome=1" >

Based on the changes, I added a bit of content to my web page, meaning the following: If the current browser version is <=IE8, then give me chrome, if not, use IE.

<meta http-equiv= "x-ua-compatible" content= "IE=EDGE,CHROME=IE8" >
Use of Urlrewritefilter

Huanhuan happy to finish the above content, I think so I can visit their own site, but sad to find that only the home page is the use of chrome core, other pages without x-ua-compatible tags or use IE core. This is too painful, let me find out all the HTML page, and then a manual to add, such things are people do? Think of someone like me to meet the same pit dad thing, so Google search a bit, and finally found the literature 1. See the foreigner describe IE browser word, suck,fuck,shit, can see he is much hate ie. According to the author's introduction, I know Urlrewritefilter, came to his official website, followed by the tutorial to step by step implementation. OK, finally solve the problem.

The whole idea of this thing is that whether you are requesting or response, in the end he will add your settings on your request page, and what I am setting here is <meta http-equiv= "x-ua-compatible" Content= "Ie=edge,chrome=ie8" >.

Finally Google Chrome Frame this thing is no longer officially supported by 2014, the official recommended us to download the latest Google browser. But I think that should not affect the use.

IE embedded Google Chrome frame to solve browser compatibility issues

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.