强制浏览器使用兼容模式,Web.config,httpProtocol

  对于一些政府类的网站,很多支持IE6~8,而不支持使用更高版本浏览器浏览。虽然有些浏览器会自动使用兼容模式,或有些人会手动调整浏览器的兼容模式,但不是每一个人、每一款浏览器都可以做到用兼容模式。所以,强制浏览器使用指定版本的兼容模式运行,变得势在必行。

<configuration>
  <system.webServer>

    <!-- 设定网站服务器以指定预设兼容性模式 Lionden -->
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=EmulateIE7" />
      </customHeaders>
    </httpProtocol>

  </system.webServer>

</configuration>

  

微软IIS知识链接:http://www.iis.net/configreference/system.webserver/httpprotocol

 

Lionden 2014年5月14日

E-mail:hsdlionden@hotmail.com

转载请注明原文地址和博客园Liondenhttp://www.cnblogs.com/lionden/

posted on 2014-05-14 20:53  Lionden  阅读(7691)  评论(0编辑  收藏  举报

导航

 联系我 | 新浪微博关注我 | 返回首页 
版权所有 © Lionden Lee · Beijing
电子邮箱:hsdlionden@hotmail.com