Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One of my pages (with very extensive javascript) won't load on IE9. It loads ok in Mozilla, Chrome, Safari and Opera.

If IE9 Developer tools are running it loads fine.

If I load IE9, load the developer tools (F12) then kill the developer tools it still loads fine.

If developer tools are running then sometimes (but not always) the first message in the console is:

HTML1113: Document mode restart from Quirks to IE9 Standards 

Doctype is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">

If I change doctype to and remove the xmlns nothing changes.

I'm stumped. Any suggestions appreciated.

share|improve this question

closed as off topic by Brent Pabst, John Gardeniers, Zoredache, Chris S Sep 11 '12 at 12:41

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

You have two options. Stop using IE or fix your code. It might also be worth catching up with the rest of the world and stop using XHTML, which has now been abandoned even as a proposed standard. – John Gardeniers Sep 11 '12 at 3:26
You may want to try compatibility mode in Internet Explorer to see if this resolves the issue. Does it happen load OK on IE8? – needmorebeerformewallaby Sep 11 '12 at 12:09
I 2nd @JohnGardeniers here. It really does sound like your app is treating IE differently than the other browsers. IE9 is fairly compliant with most JavaScript things when compared to Chrome, its just a bit slower at processing it all. Its ok to treat older versions of IE differently, but your app is certainly the cause of whatever problem you are having. – Brent Pabst Sep 11 '12 at 12:12
Have you tried reregistering IE? This article has files attached that fix IE8+ on in various combinations of 32/64bit. It's written in German if you want the auto-translated version – Chris S Sep 11 '12 at 12:41
Sorry, your question is Off-Topic on Server Fault. It would be appropriate on Stack Overflow if you can include the details listed on the How to Ask page. Please see either site's FAQ for more details. Thank you! – Chris S Sep 11 '12 at 12:42
up vote 4 down vote accepted

Do you use console object and its methods? IE9 only instantiates it when you open developer tools, and any attempt to index it without checking if it exists will, obviously, fail. Simple workaround is to install empty object and empty stub for most commonly used function - console.log on start of your code.

share|improve this answer
Thanks Oleg - I did use the console object - previously I had tested for it before using but the code that did the testing must have been "Cleaned up" at some point - hence the failure. Your diagnosis is 100% correct. – RoyHB Sep 11 '12 at 15:56

See IE9’s Document Modes and JavaScript for info about IE's different document modes. Setting the document mode might fix the problem, but then your web page won't work in early versions of IE. You'll probably need to iteratively narrow down the problem in your JavaScript and modify it to work in IE.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.