Over the past few months you put tons of time and effort into your awesome new site. However, your roll it live and find out that someone accidentally has Compatibility Mode mode in IE turned on. Now your scripts don’t function exactly how you imagined and your layout is acting funky. There are some Meta tags that apparently take care of this if you add them to your page (<meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″ />) but personally I haven’t had great success with these. Below is the way I found best in .net to disable and turn off Compatibility Mode in IE:
On your page (preferably master page in web forms or mvc) add this line:
<% Response.AddHeader(“X-UA-Compatible”, “IE=edge,chrome=1”); %>
In my case I’m adding it below the <%@ Master Language=”C#” … line before the start of content (doctype).
Update: You can also easily add the header in IIS (no need to update your code) by going to ‘http response headers’ and choosing ‘add’: