Forcing Internet Explorer 10 to Render in Standards Mode with X-UA-Compatible
Learn how to force IE10 into standards mode using the X-UA-Compatible meta tag, with placement rules, limits, and verification steps.
24 Jul 2025, 13:16 UTC

<head> section of the page, before any <link> or <script> elements that could trigger layout:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
How the X-UA-Compatible Tag Works
When IE10 parses an HTML document, it scans the byte stream for an X-UA-Compatible header—either as an HTTP response header or as a meta tag in the markup. If the tag is found before the browser begins to load external resources that affect layout, the rendering engine locks the document mode to the mode indicated by the content attribute. The value edge maps to the latest standards mode the browser can provide, which for IE10 is its own standards mode.
Worked Example
Consider a simple page that uses a CSS3 feature only available in standards mode, such as a flex container:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Flexbox test</title>
<style>
.container { display: flex; gap: 1rem; }
.box { width: 80px; height: 80px; background: #cfc; }
</style>
</head>
<body>
<div class="container">
<div class="box">1</div>
<div class="box">2</div>
<div class="box">3</div>
</div>
</body>
</html>
If the meta tag is omitted or placed after the <style> block, IE10 may fall back to a compatibility view and the flex layout will not render as expected.
Limits and Gotchas
- The meta tag must appear before any elements that could trigger layout, such as external stylesheets (
<link rel="stylesheet">) or scripts (<script>). If it appears later, IE10 may have already decided on a document mode. - An HTTP header named
X-UA-Compatibleoverrides the meta tag. If your server sends such a header, ensure its value matches the desired mode or remove it. - When the page is served from an intranet zone that has “Display intranet sites in Compatibility View” enabled via Group Policy, the meta tag can be ignored unless the policy is overridden or the site is added to the Compatibility View exceptions list.
- The feature is disabled for pages loaded via the
file://orftp://protocols; the meta tag has no effect in those contexts.
Verification Steps
- Open the page in a genuine IE10 installation or a reliable emulation that uses the legacy Trident engine.
- Press F12 to open Developer Tools, select the Emulation tab, and check the Document mode dropdown. It should read Edge (or the highest standards mode IE10 provides).
- Alternatively, open the Console tab and enter
document.documentMode. The value should be10, indicating IE10’s standards mode. - To confirm the effect, temporarily remove or reposition the meta tag and reload the page; the Document mode should change and a standards‑only feature such as flexbox will break or render differently.
Common Mistakes to Avoid
- Placing the meta tag after CSS or JavaScript links, which causes IE10 to ignore it.
- Using an incorrect value such as
content="IE=10". This locks the document to IE10’s quirks mode rather than standards mode. - Relying on conditional comments (
<!--[if IE]>) to affect rendering; IE10 no longer supports them for document mode selection. - Assuming the tag works when testing locally with
file://; the feature is disabled for those protocols. - Expecting the tag to change JavaScript engine behavior or mitigate security issues; it only influences layout and CSS rendering.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.