IE8 預設用標準模式渲染,舊代碼常崩壞。最快止血法:強制 IE8 用 IE7 引擎(兼容視圖),三種方式任選其一。
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
放在 <head> 最前面,確保在解析前生效。
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
LoadModule headers_module modules/mod_headers.so
Header set X-UA-Compatible "IE=EmulateIE7"
僅特定資料夾:
<Location /myfolder>
Header set X-UA-Compatible "IE=EmulateIE7"
</Location>