[英]How do I set different options for X-UA-Compatible in Apache for IE8 and IE9?
我在用IE8渲染大表时遇到了问题(请参阅此 ),它运行缓慢并挂起。 这在IE7中正常运行,因此要解决该问题,我在Apache httpd.conf
文件中使用了Header add X-UA-Compatible IE=EmulateIE7
,现在一切正常。 我也使用IE9,并且为IE7仿真添加HEADER可使我的网站正常运行。 但是通过此修复程序,IE9也使用了EmulateIE7
我希望它使用IE9渲染引擎。 我希望IE8使用IE7渲染引擎,而IE9使用IE9渲染引擎。
有谁知道如何在同一个网站上做到这一点? 在相同修复程序中添加另一个条目不起作用。
我认为您无法在Apache中指定它-您正在尝试根据用户代理进行逻辑处理,这是不可靠的。 更好的方法是在每页评估中。 您可能需要使用以下内容:
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9">
是的,我们可以做到,请参考:设置服务器级别响应标头
1. Open httpd.conf in a text editor
2. Uncomment (or add) “LoadModule headers_module modules/mod_headers.so”
3. Add the following configuration fragment at the end of the httpd.conf file:
<IfModule headers_module>
Header set X-UA-Compatible: IE=EmulateIE7
</IfModule>
4. Save httpd.conf file
5. Restart the Apache server
6. Browse the test web page
引用链接: http : //blogs.msdn.com/b/hanuk/archive/2008/08/28/apache-httpd-configuration-for-ie7-standard-mode-rendering-in-ie8.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.