By default IE8 forces intranet websites into compatibility mode. I tried changing the meta header to IE8, but it doesn't acknowledge the meta header and just uses the browser setting. Does anyone know how to disable this?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- Is TWebBrowser dependant on IE version?
- Javascript does not work in IE8
- IE dropdown z-index bug
- Multiple cookies with same name
相关文章
I had struggled with this issue and wanted to help provide a unique solution and insight.
Certain AJAX based frameworks will inject javascripts and stylesheets at the beginning of the
<head>
and doing this seems to prevent the well-established meta tag solution from working properly. In this case I found that directly injecting into the HTTP response header, much like Andras Csehi's answer will solve the problem.For those of us using Java Servlets however, a good way to solve this is to use a ServletFilter.
For anyone else reading this looking to disable this via GPO for all users, this is the setting:
Computer Configuration/Administrative Templates/Windows Components/Internet Explorer/Compatibility View/Turn on Internet Explorer Standards Mode for Local Intranet
although the web.config edit fixed it for me.
I found a working answer that allow to override the checked Intranet Compatibility View. Just add in the OnInit event of your page this line (no meta or web.config customHeader need):
This isn't exactly a solution but, I feel it is the best one. On our intranet sites we tell people it can only be accessed by Firefox, we don't take kindly to IE users around here. Check the user agent on the server or client side and deny them access from IE. And I'm a .NET programmer.
If you want your Web site to force IE 8 standards mode, then use this metatag along with a valid DOCTYPE:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
Note the "EmulateIE8" value rather than the plain "IE8".
According to IE devs, this should, "Display Standards DOCTYPEs in IE8 Standards mode; Display Quirks DOCTYPEs in Quirks mode. Use this tag to override compatibility view on client machines and force Standards to IE8 Standards."
more info on this IE blog post: http://blogs.msdn.com/b/ie/archive/2008/08/27/introducing-compatibility-view.aspx
Try this metatag:
It should force IE8 to render as IE8 Standard Mode even if "Display intranet sites in compatibility view" is checked [either for intranet or all websites],I tried it my self on IE 8.0.6