internet-explorermeta-tagsx-ua-compatibleie11-developer-tools

What value needs to passed for X-UA-Compatible meta tag's content attribute to set document mode as 5?


Working on a legacy application, one of the UI functionality is breaking in IE11. While trying emulating different docModes, it's working fine for doc mode = 5 and UserAgent = IE 11

I Want to set this behavior through the application code, I have tried this meta tag at the top of the page-

<meta content="IE=5" http-equiv="X-UA-Compatible">

But unable to get the same behavior. Am I missing something?

As per W3 Validator,

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.

In that case what should be the value of http-equiv and content for meta tag to set that behavior?

EDIT: Adding the HTML code snippet

<!DOCTYPE HTML null null null>
<HTML>
    <head>
        <meta content="IE=5" http-equiv="X-UA-Compatible">
    </head>

Solution

  • Please don't use compatibility view.

    You can also refer to this doc and check if you meet one of the conditions which makes IE use a wrong document mode. For example:

    The page is loaded in the Intranet zone and Internet Explorer is configured to use Compatibility View for pages loaded from the intranet.