HTML Guide
Setting the X-UA-Compatible
HTTP header with the value IE=edge,chrome=1
is non-standard; it should be set to IE=edge
only.
The X-UA-Compatible
header is used to specify how Internet Explorer should render a webpage. It allows web developers to opt into the latest standards mode in IE, thus ensuring better compatibility and performance by avoiding compatibility modes that simulate older browser versions. Setting it to IE=edge
tells IE to use the highest mode available, which is the most standards-compliant mode the browser supports. The additional ,chrome=1
directive was used for a Google Chrome Frame feature, which is now deprecated and should not be used in modern webpages.
To ensure your HTML document meets the W3C standards, you must remove ,chrome=1
and just have the IE=edge
value. Here’s how you can properly set the X-UA-Compatible
header:
- In HTML Meta Tags: Ensure your meta tag within the HTML document head is correctly written.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My Web Page</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
-
In HTTP Headers: If you’re setting the
X-UA-Compatible
via server configuration, for example in an.htaccess
file (for Apache), ensure it’s configured without the,chrome=1
.
# .htaccess example
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=edge"
</IfModule>
Correctly setting this ensures that your page is rendered with the most up-to-date rendering engine, enhancing compatibility and performance across modern web standards.
Learn more:
Related W3C validator issues
The only value admitted for the attribute content in a <meta http-equiv="X-UA-Compatible"> is currently IE=edge. You’re probably seeing this issue because the page being validated includes the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
As the Google Chrome Frame plugin was discontinued on February 25, 2014, this is longer supported so you should change that meta tag to:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
According to this article in Wikipedia:
Google Chrome Frame was a plug-in designed for Internet Explorer based on the open-source Chromium project, first announced on September 22, 2009. It went stable in September 2010, on the first birthday of the project. It was discontinued on February 25, 2014 and is no longer supported.
The plug-in worked with Internet Explorer 6, 7, 8 and 9. It allowed suitably coded web pages to be displayed in Internet Explorer by Google Chrome’s versions of the WebKit layout engine and V8 JavaScript engine.