如何设置Apache中的X-UA-兼容不同的选择IE8和IE9? [英] How do I set different options for X-UA-Compatible in Apache for IE8 and IE9?

查看:242
本文介绍了如何设置Apache中的X-UA-兼容不同的选择IE8和IE9?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我面临的问题与IE8的渲染大表(见<一href=\"http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/2afa46aa-16bb-4e65-be38-a6de19b2b2e9\"相对=nofollow>这个),它会很慢,并挂起。这是在IE7中正确地工作,所以要解决它,我已经使用头添加X-UA-兼容IE = EmulateIE7 在我的Apache 的httpd.conf 文件,而现在这一切工作正常。我还用IE9和我的网站能正常工作与添加标头IE7仿真。但是,此修复程序IE9还采用 EmulateIE7 我宁愿喜欢它使用IE9渲染引擎。我想IE8使用IE7渲染引擎和IE9使用IE9渲染引擎。

I was facing issue with rendering big tables in IE8 (See this) it goes really slow and hangs. This was working correctly in IE7 so to solve it I have used Header add X-UA-Compatible IE=EmulateIE7 in my Apache httpd.conf file and now it all works fine. I also use IE9 and my site works fine with adding HEADER for IE7 emulation. But with this fix IE9 is also using EmulateIE7 I would rather like it to use IE9 rendering engine. I want IE8 to use IE7 rendering engine and IE9 to use IE9 rendering engine.

有谁知道这是如何可以用相同的站点来完成?添加在同一修复的另一个条目不起作用。

Does anyone know how this can be done with the same site? Adding another entry in same fix doesn't work.

推荐答案

我不认为你可以在Apache中指定这个 - 你试图基于用户代理,这是不可靠的做逻辑。更好的方式来做到这一点是在每个页面的评价。您可能需要使用这样的:

I don't think you can specify this in Apache - you're trying to do logic based on the User Agent, which is unreliable. The better way to do this is on a per-page evaluation. You might need to use something like this:

<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9">

有得阅读:<一href=\"http://stackoverflow.com/questions/3413629/emulate-ie7-for-ie8-but-not-for-ie9-using-x-ua-compatible\">Emulate IE7 IE8的,但不是IE9使用英寸×UA兼容&QUOT;

这篇关于如何设置Apache中的X-UA-兼容不同的选择IE8和IE9?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆