Home Tech Geek Web Development Solution to: How do I stop Internet Explorer from barfing on Javascript...

Get social!

Solution

I add the following code to a common javascript file that all my other files include. This way console.log() statements will do nothing in IE. I remember getting this on stackoverflow.com, but I don’t have the exact link.

Of course, there is much more you can do here, but for me this is fine, as I avoid IE at all costs anyway, and only test in it at the very end of the development stage. Perhaps not the best strategy, but it works for me.

Leave a Reply

Bad Behavior has blocked 39 access attempts in the last 7 days.