Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET App - Set IE7-Compatibility Mode?

What is the simpliest way to set the IE7-Compatibility Mode mode in an ASP.NET application to deal with IE8 issues? Is it possible to set this via the web.config or must it either be set at the IIS or page level?

like image 448
schooner Avatar asked Apr 03 '09 11:04

schooner


1 Answers

Add the header

X-UA-Compatible: IE=EmulateIE7

in the HTTP Headers tab of the site or application properties in IIS manager. In IIS7 its the HTTP Response Headers feature.

You can place it the <system.webServer> section of a web.config

   <httpProtocol>
        <customHeaders>
            <add name="X-UA-Compatible" value="IE=EmultateIE7" />
        </customHeaders>
    </httpProtocol>
like image 114
AnthonyWJones Avatar answered Sep 28 '22 03:09

AnthonyWJones