Solve 90% of IE9 bugs in 2 seconds

April 15, 2012 - By

It’s inevitable that you will build a name for yourself when you work as a part of a team. One of my more infamous titles is “IE bug go-to guy”. If you’re a front end developer you know the pain that comes with this title – but like with anything, pain means gain. Years of IE bugs have been a huge benefit.

My absolute favourite kind of bug to solve is one with a solution that is dead simple, but completely unobvious. IE9 is great for these. Showing up with the experience to solve a mind boggling problem in 2 seconds is its own reward.

IE9 is a very solid browser! It holds its own well against modern contemporaries like Firefox and Chrome, but the words “Internet Explorer” will likely carry with it a negative stigma for years to come due to the less standard compliant predecessors. When I hear that IE9 is throwing a silly bug, I look for a silly fix.

Here is the solution to 90% of the IE9 bugs I’ve ever seen: 

  1. Hit F12
  2. Set the Browser mode and Document mode to the same thing. Sheesh.

For some unknown reason these can get out of sync way too easy. I think it may be some crazy keyboard shortcut I’m accidentally hitting, but often IE9 will be rendering in Quirks mode. This is causing your problems.

The Developer Tools are useful for solving most other problems if that isn’t it. It’s not quite as powerful or intuitive as Firebug (I wrote a guide for that here), but in a pinch will get you by!

I know I’m not the only one accidentally switching the modes out of sync, but I really hope that it’s only people who use the Dev Tools who are having this issue. If the average user is having this issue too, there’s no way they’ll ever solve it, and the web in general will look very bad to them.

Even just thinking about that bums me out.

UPDATE: You can do yourself a favor and also use this meta tag:

<meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″>

What this does is force IE to use the latest version of compatibility mode (and Chrome Frame if possible). The only downside is it isn’t technically valid HTML, but it doesn’t break anything. This should prevent clumsy accidental compatibility mode changes!

Categorized in:

This post was written by ArleyM