With the release of Internet Explorer 8, many customer sites suddenly had rendering errors and problems displaying the site correctly.
In order to avoid expensive and time consuming corrections Internet Explorer 8 has a new functionality called Compatibility View which enables the browser to emulate Internet Explorer 7.
Internet Explorer 8 Compatibility View
The question many customers asked is ”How can I force the client browser to use the Compatibility View when they visit our site? So that the customer doesn’t have to activate it on the client side.”
Web Developers and Site Administrators can configure IIS and their sites to tell Internet Explorer 8 to automatically Emulate Internet Explorer 7 when they visit their site or just specific WebPages.
This is done by adding a custom HTTP Header to the IIS and the website web.config or to add a meta tag to specific pages. The HTTP Header is interpreted by the Internet Explorer 8 which will activate the compatibility view. All other browsers will simply ignore this custom HTTP Header.
Add the custom HTTP response header in IIS
To add a custom HTTP response header at the Web site level, at the folder level, or at the virtual directory level in IIS, follow the steps for the version of IIS that you are using.
IIS 7 on a Windows Server 2008-based Web server
Start IIS Manager. To do this, click Start, click Run, type inetmgr, and then click OK.
Under Connections, double-click the server that you want, and then double-click Sites.
Click the Web site, the folder, or the virtual directory where you want to add the custom HTTP response header.
- Under <Web site name> Home, double-click HTTP Response Headers in the IIS section.
Note The <Web site name> placeholder refers to the name of the Web site.
Under Actions, click Add.
In the Name box, type X-UA-Compatible.
In the Value box, type IE=EmulateIE7.
Click Start, click Run, type inetmgr.exe in the Open box, and then click OK.
Expand the server that you want, and then expand Web Sites.
Right-click the Web site, the folder, or the virtual directory that you want, and then click Properties.
On the HTTP Headers tab, click Add under Custom HTTP headers.
In the Custom header name box, type X-UA-Compatible.
In the Custom header valuebox, type IE=EmulateIE7.
Click OK two times.
IIS 6 and earlier versions
Add the custom HTTP response header in the Web.config file
To add this header to the Web.config file, create or revise the Web.config file as follows.
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <clear /> <add name="X-UA-Compatible" value="IE=EmulateIE7" /> </customHeaders> </httpProtocol> </system.webServer> </configuration>
Note Add this new or revised Web.config file to each Web directory in which you want to use compatibility mode.
More information can be found in KB 968499, about configuring the Compatibility View.
KB 968499 – Advanced solutions: Some Web sites may not be displayed correctly or work correctly in Windows Internet Explorer 8