views:

667

answers:

3

I'm testing a fairly complex Javascript-based web application in Internet Explorer 8 on Windows Vista. After loading the application, IE is in "standards" browser mode and "IE 8 standards" document mode. While the application is running, IE will sometimes reload the page and display a message saying something like "A display problem with (URL) has caused Internet Explorer to reload the page in compatibility view" (not the exact message, I'm on a non-English version of Vista). After the reload, the browser is in Quirks mode.

Debugging the Javascript code has been an exercise in futility since the problem can't be reliably reproduced or narrowed down, so I'd appreciate any insight into what could cause this behavior.

+1  A: 

check here ..

basically. per-page, you can add a meta tag

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

or, site-wide add this to header:

X-UA-Compatible: IE=EmulateIE7
Scott Evernden
+1  A: 

Sounds like Automatic Crash Recovery occurring in the renderer itself. That's a bug in IE itself rather than your scripts, so debugging is going to be tough indeed.

Does this happen on all IE8 installs? Is IE8 updated with the latest patches? (Could it be an unreliable third-party extension?)

bobince
+1  A: 

There must be a problem with the markup you are serving/creating via innerHTML. Here's an article from the IE team which includes details of IE's auto-recovery from markup that is impossible to parse correctly in IE8-standards-mode:

...there are particular code paths within the new layout engine where, should an error occur, the layout process can’t gracefully recover and we’ve kept assertions around these paths... We refined this experience further in the released version of IE8 by recovering layout “hard asserts” using Compatibility View. In other words, we believe that showing a page the way IE7 would have offers a better user experience than showing no content at all.

Note that using innerHTML invokes the HTML parser, so it could trigger this problem even after the page is loaded if fed an HTML string it can't make head nor tail of.

NickFitz
Excellent, that's exactly the information I've been looking for. My application does create a lot of HTML dynamically so now I know where to start debugging. Thanks!
Daniel Wagner