I am having a big issue trying to disable IE's Compatibility mode.
After much head banging, I have traced the issue down to whether the site is been served as Apache's default config, or as a virtual host.
I know this to be the case as when I access the site with the 'localhost' domain, everything is fine. As soon as I access the very same page via a domain configured in a virtual host - the site renders in Compatibility mode.
Can anyone please shed any light on this crazy issue???
Serving the site as the default host isn't an option.
- Dean
When a web-site is being served on the local intranet, Internet Explorer will (by default) switch to IE7 compatible mode.
You can use the to disable this "IE7 on the intranet compatibility mode" by including the X-UA-Compatible response header to your page:
You can also add the equivlent of an http response head to your page by including a
meta http-equiv
element to theHEAD>
of your document. E.g.:Note: If you do include the header
to your html document, you must add it high enough in the
HEAD
before something else happens that locks in the document mode - and you're locked into IE7.Wrong example 1
meta
elements belong inside thehead
elementWrong example 2
The
X-UA-Compatible
element must appear first in thehead
; except fortitle
and othermeta
elements.Wrong example 3
The conditionals lock the browser into IE7 mode. Remove them.
Correct
Ah-ha!
From here (emphasis mine):
I'm not commenting this. I'm sure this has some good real-world reasons, but I still have the urge to hit my head on the desk.