2012-11-02 28 views
0

我在使用IE8渲染大型表格時遇到了問題(請參閱this),它非常緩慢且掛起。這是在IE7中正常工作,所以要解決它我已經在我的Apache httpd.conf文件中使用Header add X-UA-Compatible IE=EmulateIE7,現在一切正常。我也使用IE9和我的網站工作正常,爲IE7模擬添加HEADER。但有了這個修復IE9也使用EmulateIE7我寧願喜歡它使用IE9渲染引擎。我想讓IE8使用IE7渲染引擎和IE9使用IE9渲染引擎。如何在Apache中爲IE8和IE9設置不同的X-UA兼容選項?

有誰知道這可以用同一個網站來完成嗎?在同一修補程序中添加其他條目不起作用。

回答

3

我不認爲你可以在Apache中指定 - 你正在嘗試基於用戶代理來做邏輯,這是不可靠的。更好的方式是按照每頁評估進行。您可能需要使用這樣的:

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

東西可以讀:Emulate IE7 for IE8 but not for IE9 using "X-UA-Compatible"

+0

感謝您的鏈接。那麼使用HEADER我正在觸發文檔模式到IE7,但瀏覽器模式仍然是IE8。所以用戶代理仍然是MSIE 8.0或MSIE 9.0依賴於瀏覽器。 – ppant

2

是的,我們能做到這一點,plase裁判: 設置服務器級響應頭

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

相關問題