Search code examples
javascriptinternet-explorer-9browser-console

Why does require cause a timeout in Internet Explorer 9 when the browser console isn’t open?


I am maintaining a legacy web application that is built on top of the following stack:

  • Server side
    • NGINX
    • Tornado
  • Client side
    • RequireJS
    • jQuery
    • Backbone

Everything works fine in Firefox and Chrome, but in IE9, calling require inside a function to dynamically load a module causes a timeout. With the JavaScript console opened to look for errors it works fine (and there are no errors logged).

Any ideas?


Solution

  • Activated developer tools usually affect your page and javascript with at least two things:
    1) console.*() functions are available while dev tools are open (usually it's because of forgotten console.log() in your code. I recommend console.log wrapper)
    2) different than default IE rendering engine version selected. Check your Doctype and X-UA-Compatible meta tag value.

    Also check this: Does IE9 enable 'something' when using developer tools?