views:

733

answers:

5

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?

A: 

The <!DOCTYPE> element is what you're looking for. This article goes in-depth into how it all works. But basically you want to specify IE8 (or edge) in the meta tag and then include a strict DOCTYPE.

See also.

jeffamaphone
Thanks but this doesn't solve the problem. I tried this. It simply doesn't override the clients "make intranet compatability view" setting.
sanpall
Ah, I didn't properly understand what you meant by "the browser setting." Okay, well, I don't think you *can* override the user's choice. Generally the IE team doesn't like letting websites override user choices.
jeffamaphone
+3  A: 

If you pull down the "Tools" menu and choose "Compatibility View Settings" On that dialog at the bottom is a setting "Display intranet sites in compatibility mode". If you uncheck this that should resolve the problem and IE will use the mode based on the DOCTYPE.

PilotBob
Is there anyway to know why this got a downvote and by whom?
PilotBob
I didn't downvote, but I would guess it's because you answered from the user's perspective (what a user should do). This question is from a web developer and is asking how to fix the problem without requiring the user to do anything in particular.
Roy Tinker
In addition, this doesn't allow for maintaining compatibility with old applications. If you uncheck that setting, your old apps may break with no way to update them.I think the asker is looking for a way to force standards mode when all other apps on their intranet require the checkbox to be checked for compatibility mode.
Andrew Lewis
I believe he did answer it from a programmer perspective. "...IE will use the mode base on the DOCTYPE". See: http://msdn.microsoft.com/en-us/library/ms535242%28VS.85%29.aspx If the company is running Active Directory, changes to browser settings can be propagated by the administrator. You can't do that with FireFox!
Nate Zaugg
+1  A: 

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.

Caimen
I like your idea. but we have no firefox here.
Dennis Cheung
The browser wars continue! :)
Nate Zaugg
+2  A: 

Try this metatag:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

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

alaa9jo
No. It does not.
Dennis Cheung
A: 

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

ashtonium