Stupefyingly weird IE 9 Javascript bug: Altering doc title makes subsequent code execute Stupefyingly weird IE 9 Javascript bug: Altering doc title makes subsequent code execute javascript javascript

Stupefyingly weird IE 9 Javascript bug: Altering doc title makes subsequent code execute


like InvertedSpear mentions, check your doc type out, i've had problems with IE9 recently and most of it boiled down to the Doc type tags triggering a compatability mode i didn't need, the same can be true of the meta tags so it might boil down to your Meta tags.

You can always impose a working compatibility mode using the links below too.

from: http://evolpin.wordpress.com/2011/02/25/ie9-compatibility-and-the-meta-tag/

I’ve discovered that this is indeed documented by Microsoft…

http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx

“The X-UA-Compatible header is not case sensitive; however, it must appear in the header of the webpage (the HEAD section) before all other elements except for the title element and other meta elements.”


Whenever I see something like this happen in any language it's because there is other code that has a bug. As you pointed out your simple case doesn't produce the problem. Try removing other code a few lines at a time until the problem disappears - the last removed code should contain the problem.

Cheers