Have you ever noticed that you get a little ‘broken page’ icon in the address bar of some sites in Internet Explorer? This basically means that IE can’t understand the HTML you’ve given it (even though it may well be valid W3C HTML!), so it goes into something called ‘Quirks Mode’, potentially making the site look pony.
If you see this, hit F12, and you’ll see what browser mode, and document mode, IE is running in. On a recent high profile site we worked on recently, if you ran the site in IE9, the browser went into IE9 browser mode, but IE8 document mode. This means IE9 is emulating an IE8 browser. Now the site looks fine in IE8, but IE9’s emulation of IE means it ignored loads of thing, and the site looked absolutely awful.
Now, there is an alleged fix – use the meta-http-equiv meta tag. Like this:
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
…which is a bit rubbish to start with. It tells IE to use the latest document mode – er, itself, in this case – pretty pointless?
Now, this doesn’t necessarily work, but it’s worth than that. For us, it worked on our internal network, but not externally! How mental is that? (there is something on the Microsoft web site about it behaving differently on intranets, but I’d wasted too many days trying to solve the issue by then to have time to read it…)
After much pain, we discovered that the reason IE9 in IE8 document mode didn’t work is that it didn’t understand all the new HTML5 constructs we were using – header, article, section, aside, etc. Changing all these to CSS-classed divs solved the issue. IE8, of course was fine!
So, well done Microsoft – we try and build semantic mark up, and use the latest technology, and have to take it all out so that your latest browser can render our site.Maybe we should re-build it all in tables just to be sure!
51.400360
-0.295229