问题
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.
回答1:
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">
Something to read: Emulate IE7 for IE8 but not for IE9 using "X-UA-Compatible"
回答2:
Yes we can do it, plase ref: Set server level response header
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
ref link: http://blogs.msdn.com/b/hanuk/archive/2008/08/28/apache-httpd-configuration-for-ie7-standard-mode-rendering-in-ie8.aspx
来源:https://stackoverflow.com/questions/13189817/how-do-i-set-different-options-for-x-ua-compatible-in-apache-for-ie8-and-ie9