Mess up Internet Explorer behaviour with console.log

Using console.log statements in your Javascript code can break behaviour in Internet Explorer, including version 9 of that browser.

I just got burned by this.

So note to self: Remove all instances of console.log() prior to deploying or before testing on Internet Explorer.

2 thoughts on “Mess up Internet Explorer behaviour with console.log

  1. You can also add a single line function definition of console.log if it doesn’t exist using a ternary operator. Just an empty function is enough to fix IE and allow you to keep logs in for debugging in the field.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">