IE fils du…. maduite IE!

Damn you IE, so after a while struggling with IE and their “Browser compatibility” I found some very interesting stuff…

First…

Appears that when you are using console.log without checking if IE likes it or not it fails silently… and by silently I mean it stops the whole JS loading routine…

so beware before any console output from JS in your IE browser.. first make sure it “fails correctly” (as the snipplet below)

1
if(!window.console) console = {log: function(){}};

Second…

For some new html5 pages when using the html5 doctype

1
<!DOCTYPE html>

IE, auto magically activates the quirks mode.. which will make your webpage look odd if you are do not preach IE CSS rules… among other oddities… To avoid this tell the browser you support the latest IE by using the next meta tag, this will save you some headaches (“some”, not all of them).

1
<meta http-equiv="X-UA-Compatible" content="IE=edge">

One more thing, do not forget to put it in the head tag… because you know… that is where usually the meta tags are…

el_Avena off…