首页 > Web开发 > 详细

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

时间:2016-09-15 00:49:27      阅读:269      评论:0      收藏:0      [点我收藏+]

  对于一些政府类的网站,很多支持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

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

原文:http://www.cnblogs.com/comsky/p/5873940.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!