The compatibility of IE browser has always been a headache for website developers. As we all know, Microsoft's Internet Explorer team has been committed to building IE8 as the most industry-standard browser. Unfortunately, not all websites currently comply with these standards. So how can we make the website run in IE8 compatibility mode. The following describes several common methods to solve such problems for website developers.
Method 1:
You can add the meta tag to all pages on your website. After adding the compatibility tag here, it is only useful to the current page and must be inside the head tag, it must also be in front of other CSS style definitions or links, otherwise it will not produce results. ExampleCodeAs follows:
<HTML> <br/> <pead> <br/> <title> my webpage </title> <br/> <meta http-equiv = "X-UA-compatible "content =" Ie = emulateie7 "/> <br/> </pead> <br/> <body> <br/> <p> content here. </P> <br/> </body> <br/> </ptml>
Method 2:
This is another method introduced on the Internet. I personally tested it and did not use it. Later I saw this article.Article, Probably because my IIS version may not be ii7)
Http://blogs.msdn.com/ B /webtopics/archive/2008/09/05/configuring-iis-to-work-around-webpage-display-issues-caused-by-internet-explorer-8-0.aspx
Modify the Web. config file in the site configuration file to make the website compatible. The sample code is as follows:
<Configuration> <br/> <system. webserver> <br/> <pttpprotocol> <br/> <customheaders> <br/> <clear/> <br/> <Add name = "X-UA-compatible" Value = "Ie = emulateie7"/> <br/> </customheaders> <br/> </pttpprotocol> <br/> <system. webserver> <br/> </configuration> </P> <p>
Method 3:
Configure IIS and add HTTP header. This is to set the current server at the server level so that all the sites under the server can be compatible with IE8. This is a recommended practice. It takes the least time to configure the server, because the entire server works, it can effectively solve potential compatibility problems.
For specific settings, refer to the following materials:
1. IIS,Http://msdn.microsoft.com/zh-cn/library/cc817572.aspx
2. Apache,Http://msdn.microsoft.com/zh-cn/library/cc817573.aspx
In addition, other materials:
If your website runs in an Apache environment, the following article details how to configure the website.
Http://blogs.msdn.com/hanuk/archive/2008/08/28/apache-httpd-configuration-for-ie7-standard-mode-rendering-in-ie8.aspx
For more information about the Internet Explorer 8 compatibility model, visit Microsoft's official website:
The http://msdn.microsoft.com/en-us/library/cc288325 (vs.85). aspx