2
votes

I have a website that I would like never to viewed in compatibility mode.

For example, I had to explain to my client why not to view sites with this button selected.

enter image description here

My question is, how can I stop this button from being activated, or my site from ever being viewed in compatibility mode?

For example www.facebook.com - has no compatibility view button on there site!?

How can I do this for all versions of IE which have compatibility mode option?


I tried this...

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />

But the button is still there?


Any ideas would be great thanks.



It is not validating, am I doing something wrong?

enter image description here

2
Have you tried just using content="IE=edge" without the 9,8,7 entries? - Ryan Hayes
Yeh just tried <meta http-equiv="X-UA-Compatible" content="IE=edge" /> and in IE8 - button still works :( - Joshc

2 Answers

2
votes

Try just using IE=edge:

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

Add this meta tag as the first thing in <head>. Using just the one should force your users' browser to render in the most recent standards mode.

I've not used multiples in the content attribute, but IE shows the compatibility mode button when it sees that it has options to render in an older version. Using only one tells it doesn't have any options, and should remove it.

0
votes

You have to send a HTTP header. In ASP.NET it is like:

Response.AddHeader("X-UA-Compatible", "IE=edge");