问题
I can't find anything about this on the internet, so I'm looking for help here:
For some technical reasons I try to force IE9 into IE8 rendering mode, using the following meta tag as the first line right after <head>
:
<meta content="IE=8" http-equiv="X-UA-Compatible">
For some reason all the IE9s in our office just render IE9 style, no matter what I try. When I look into the DevTool (F12) from IE9, it shows me that IE8 is the "page default", but it still sticks to the rendering mode set in the DevTools. There is no way to influence that. We even did a delete and re-install of IE9, because we thought somehow once you use the DevTool setting for rendering mode, IE9 sticks to that forever...
This is not about the reasoning about forcing IE9 into any other mode. In this special case it is our preferred choice.
What's driving me mad is that IE9 should respect the meta tag according to all the information I read out there, but for some weird reason our IE9s don't care about it.
Has anybody out there any idea on what could prevent IE9 from behaving like IE8?
Best regards, Roman.
回答1:
It sounds to me like everything was working properly. If IE8 was identified as the "page default," but IE9 was selected, it's likely the browser is remembering your explicit decision to render in IE9. Just manually select the "page default," and the browser should respect that from hence forth.
As long as IE8 is being identified as the page default, all is well. Just tell your team to switch back to the page default on that particular domain/page. IE won't fight you over who gets to set the Document Mode. If you have previously selected IE9 Standards from the list, it will respect that, even when the page's default is otherwise.
来源:https://stackoverflow.com/questions/10813947/ie9-does-not-at-all-care-about-x-ua-compatible-meta-tag