How to enable IE 9 compatibility mode for your website
For each major release IE gains new features and brings its support to industry standards more closely. However it also increases risk that older websites may not display correctly.
As a matter of fact, playing with IE 10 Developer Preview we noticed some rendering errors on our documentation web pages. We fixed it using the compatibility mode feature introduced by IE 8. With the upcoming release of IE 10 many customer sites will fall into the same kind of problem so here is how to fix it:
We need to force the client browser to use the Compatibility View when they visit our site. This is done either at the webpage level by adding the following meta tag to the header of each webpage you want to use compatibility mode:
<head> <!-- Mimic Internet Explorer 9 --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" > <title>My webpage</title> </head>
or at the folder level by adding the following header to each Web.config file of each web directory you want to use compatibility mode:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE9" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
or at the website level by implementing the META Switch directly on IIS as follow:
To configure IIS 7 on a Windows Server 2008-based computer to include a custom HTTP response header:
- Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
- In the connections pane, expand the node for the server, and then expand .
- Click the Web site where you want to add the custom HTTP response header.
- In the Web site pane, double-click in the section.
- Under Actions, click Add.
- In the Name box, type X-UA-Compatible.
- In the Value box, type IE=EmulateIE9.
- Click OK.
To configure IIS 6 and earlier versions to include a custom HTTP response header:
- Click Start, click Run, type inetmgr.exe, and then click OK.
- Expand the server you want and then expand Web Sites.
- Right-click the Web site you want and then click Properties.
- Click the HTTP Headers tab.
- Under Custom HTTP headers, click Add.
- In the Custom header name box, type X-UA-Compatible.
- In the Custom header value box, typeIE=EmulateIE9.
- Click OK two times.
Note that all other browsers will simply ignore this custom HTTP Header. Also note that the compatibility mode set a the website level using your Web server can be overridden by setting a different compatibility mode at the web page level.
You can find more information here: Defining Document Compatibility.
Hope this helps.
Thibault NESTOR
Share this:
Leave a Reply Cancel reply
Search
Categories
- .NET (4)
- .NET Domain Model (36)
- ASP.NET (31)
- ASP.NET MVC (2)
- C# (3)
- Cache (1)
- Data access (1)
- Developing Using CodeFluent Entities (141)
- Documentation (10)
- Entity Framework (2)
- Exploring the CodeFluent Runtime (12)
- Importers (16)
- Links (9)
- MySQL (2)
- News (64)
- Not CodeFluent Related :) (19)
- Oracle Database (31)
- Pet Shop Reloaded (2)
- PostgreSQL (2)
- Presentation (63)
- Producers (5)
- ServiceStack (1)
- SharePoint (10)
- SoftFluent Products (16)
- SQL Server (44)
- SQLAzure (39)
- Templates (13)
- Tools (2)
- Uncategorized (2)
- WCF (10)
- Web API (2)
- WPF (10)
Recent Posts
- [Pet Shop Reloaded] The Application
- [Pet Shop Reloaded] A comparative study between CodeFluent Entities and Entity Framework
- Using flags enumeration with ASP.NET MVC and CodeFluent Entities
- Defining type mappers when importing a database using the Importer Wizard
- Creating a custom sub producer to only generate resources
Top Posts
Top Rated
Archives
- June 2013 (2)
- May 2013 (5)
- April 2013 (6)
- March 2013 (5)
- February 2013 (4)
- January 2013 (1)
- December 2012 (3)
- November 2012 (8)
- October 2012 (8)
- September 2012 (4)
- August 2012 (7)
- July 2012 (8)
- June 2012 (11)
- May 2012 (4)
- April 2012 (11)
- March 2012 (11)
- February 2012 (12)
- January 2012 (14)
- December 2011 (12)
- November 2011 (16)
- October 2011 (5)
- September 2011 (16)
- August 2011 (15)
- June 2011 (22)
- May 2011 (16)
- April 2011 (11)
- March 2011 (16)
- February 2011 (16)
- January 2011 (14)
- December 2010 (1)
- November 2010 (9)
- October 2010 (1)
- September 2010 (1)
- July 2010 (2)
- June 2010 (2)
- May 2010 (1)
- April 2010 (1)
- March 2010 (2)
- February 2010 (1)
- January 2010 (4)
- December 2009 (5)
- November 2009 (1)
- August 2009 (1)
- July 2009 (1)
- June 2009 (2)
THANK YOU!!! IE 10 was ruining my life – and you have given me the information to fix it! Thank you so much