Jsonic
Jsonic

Reputation: 11

Forcing compatibility mode IE not working

I need to display a webpage in compatibility mode. I've tried the following tag:

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

But this only works if I have compatibility mode ON. With compatibility mode ON, the above tag allows me to change which version of IE the document should be displayed in. With compatibility mode OFF, the above tag has no affect.

Shouldn't this work with compatibility mode OFF?

My situation: Developing website that looks perfect when viewed in IE10/11 with compatibility mode ON. With it OFF it looks bad. Fixing it so that it runs without compatibility mode is not an option. What I need is to force compatibility mode ON for any user that views the site, so that they do not need to manually turn it on. Is this possible?

Thanks in advance

Upvotes: 1

Views: 1060

Answers (2)

Jsonic
Jsonic

Reputation: 11

The reason the X-UA-Compatible is not working is because I am using IE11. IE8 will turn compatibility mode on automatically, and then as a developer you can set the content mode. But IE 10/11 require compatibility mode to be set on manually before you can begin controlling emulation via meta tags.

Upvotes: 0

Abdelrahman Wahdan
Abdelrahman Wahdan

Reputation: 2075

Use:

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

You should use IE=edge to tell Internet Explorer to use the highest mode available.

Upvotes: 2

Related Questions