Why IE8 is in IE7 mode. Variable “IE” == 7

前端 未结 3 1533
深忆病人
深忆病人 2021-01-21 06:46

I have the header in my HTML page like this below and I open this site in IE8. When I look at it in \"Web Developer\" the \"if IE 7\" is active. WebBrowser set BrowserMode on \"

3条回答
  •  再見小時候
    2021-01-21 07:08

    This post on the MSDN blog explains how Compatibility Mode can get enabled. There's a nice flowchart: http://blogs.msdn.com/b/ie/archive/2010/03/02/how-ie8-determines-document-mode.aspx

    To fix it, you can also send the following HTTP header using a .htaccess file or whatever's appropriate for your web sever:

    X-UA-Compatible: IE=8
    

    Here's a reference on X-UA-Compatible: http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx

提交回复
热议问题