Tuesday, October 7, 2014

Enable Compatibility mode in IE

Enable Compatibility mode in IE

Enable Compatibility mode in IE through code in HTML meta tag.


As there are new releases of IE (Internet Explorer) coming out regularly with new features and functionalities, it is not required for legacy page/site to support latest version of the browser. So, for this reason compatibility mode is been introduced in IE8 onwards.


I have an web application, I want it to run in IE8 or IE9 compatibility mode in IE10 as our client uses only IE8 or IE9 and we have IE10 in our work stations. Let's see how can we achieve this.


We can achieve this by setting the value of the compatibility mode.
Web page can specify compatibility mode either by using META tag or by setting the HTTP header, note that META tag will take precedence over http header when both are present.
Sol 1: META Tag- place the following code in head element of web page (HTML page).
 <meta http-equiv="X-UA-Compatible" content="IE=8, IE=9"/> 
It is not only applicable for IE but also for other browsers like Chrome:
<meta http-equiv="X-UA-Compatible" content="IE=8, IE=9, chrome=1"/>
Important to Note: META tag should be placed in head section before any script or CSS tag.

View the below screenshot for more information.

No comments:

Post a Comment