Well, working on a GWT/GXT application right now, and the latest challenge was to ensure compatibility in Internet Explorer 8. If most GWT components behave quite well in all browsers, GXT introduces some problems through permitting things IE cannot understand.
But once the GXT source code is correct, layout and CSS problems remain. Internet Explorer, or the nightmare of any web developer…
Yet, playing with the development tools and available compatibility modes, I found out that IE7’s compatibility mode introduces problems which are ruled out through using IE8’s engine. So, the only thing left to do was to forbid IE8 to use the compatibility mode, so that users do not have to tinker with settings the way I did.
Specify the compatibility mode in IE8
Quite simple actually. IE does not use comments this time, but a real
<meta /> tag. I still find it ugly, but it is better nonetheless.
So, for people who must force Internet Explorer to behave like an older version, you just have to insert this tag inside your
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Forbidding compatibility mode in IE8
That is all fair and well, but for those who remember, I aimed exactly at the contrary: not forcing the compatibility mode but preventing it instead.
Well, this actually is just as easy:
<meta http-equiv="X-UA-Compatible" content="IE=8" >
Forcing the compatibility mode to the latest version
This tip can be used to make Internet Explorer use the latest known version, and thus anticipate future versions of the browser. It looks quite like the precedent:
<meta http-equiv="X-UA-Compatible" content="IE=100" >
And in IE9+?
I actually have no idea, as my own concerns were with IE8 (for now).
Logically, the forcing the compatibility mode should work as long as the browser include this compatibility. As for forbidding it, the second tip is quite clear.
If you have any tip about compatibility mode in IE, just share it with us!
(inspired from a French post: http://nukium.com/developpement-php/interdire-le-mode-de-compatibilite-ie7-dinternet-explorer-8-ie8/)