79

I read Chrome Frame closed last month, I thus tried to understand what it'd mean for the X-UA tag and after 3 hours of research I still didn't find the answer I'm looking for, my question is the following :

Is it still valid nowadays to use IE=edge,chrome=1 or should I stop at IE-edge from now on ? Or what would be the best practice to do regarding X-UA, should it be avoided ?

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
Brennan Sei
  • 1,033
  • 1
  • 9
  • 12
  • 6
    Note that Chrome Frame has been retired. http://blog.chromium.org/2013/06/retiring-chrome-frame.html – Gajus Sep 21 '15 at 13:29

4 Answers4

120

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> serves two purposes.

  1. IE=edge: specifies that IE should run in the highest mode available to that version of IE as opposed to a compatability mode; IE8 can support up to IE8 modes, IE9 can support up to IE9 modes, and so on.
  2. chrome=1: specifies that Google Chrome frame should start if the user has it installed

The IE=edge flag is still relevant for IE versions 10 and below. IE11 sets this mode as the default.

As for the chrome flag, you can leave it if your users still use Chrome Frame. Despite support and updates for Chrome Frame ending, one can still install and use the final release. If you remove the flag, Chrome Frame will not be activated when installed. For other users, chrome=1 will do nothing more than consume a few bytes of bandwidth.

I recommend you analyze your audience and see if their browsers prohibit any needed features and then decide. Perhaps it might be better to encourage them to use a more modern, evergreen browser.

Note, the W3C validator will flag chrome=1 as an error:

Error: A meta element with an http-equiv attribute whose value is
X-UA-Compatible must have a content attribute with the value IE=edge.
fny
  • 31,255
  • 16
  • 96
  • 127
  • Thanks a lot for the explaination, it helped me a lot. – Brennan Sei Feb 27 '14 at 05:32
  • 7
    Unfortunately, Google Chrome Frame was discontinued in January 2014 (http://blog.chromium.org/2013/06/retiring-chrome-frame.html). It's still available to download from mirrors but it won't be further developed. – Stan Mar 30 '15 at 14:11
  • 2
    I'll add - that meta line doesn't validate in the W3C Validator. I had it too. I'm removing the chrome=1 at this point. – Michael K Jun 03 '15 at 14:15
  • Note, this does not force IE11 in enterprise mode (IE8 compat) into any different rendering modes. IE11 in compatibility mode is indeed forced to upscale. – felickz Nov 12 '15 at 19:55
  • 1
    To avoid validation errors, set it as a true http header instead of using a meta tag. This has the added benefit of not requiring IE to reparse using a different engine when it hits the meta tag because it already knows which engine to use before it even looks at your markup. http://www.validatethis.co.uk/news/fix-bad-value-x-ua-compatible-once-and-for-all/ (Rendering Speed) – Chinoto Vokro May 05 '16 at 17:57
15

It's still valid to use IE=edge,chrome=1.

But, since the chrome frame project has been wound down the chrome=1 part is redundant for browsers that don't already have the chrome frame plug in installed.

I use the following for correctness nowadays

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Siriquelle
  • 201
  • 2
  • 5
4
<head>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>

worked for me, to force IE to "snap out of compatibility mode" (so to speak), BUT that meta statement must appear IMMEDIATELY after the <head>, or it won't work!

Andre
  • 41
  • 1
  • 1
    There should not be a need to get IE to "snap out of compatibility mode" via a `META` element - a strict HTML4/XHTML1 doctype, or the new, simplified HTML5 doctype (i.e. ``) will trigger Standards Mode in Internet Explorer (as well as all other popular browsers.) – Jordan Clark Feb 11 '16 at 15:31
  • 4
    The meta element is still required even with IE11 if the site is on an Intranet, since by default IE11 runs these sites in compatibility mode. – Luke Harris Feb 18 '16 at 09:32
0

please see What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do? November 2021 Update by L84 As ... 10+ years old, my recommendation would be to leave this tag out altogether, unless you must support old legacy browsers.

jjffhrk
  • 1
  • 1
  • More suitable as a comment rather than answer – Jordan Dec 17 '22 at 15:30
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/33413317) – Reynadan Dec 20 '22 at 15:41