1

I am finding that IE8 renders web pages differently based on Browser mode despite Document mode always being set the same. Is this an IE8 bug?

Background is:

  • A corporate intranet being viewed by IE8 (part of the SOE).
  • Display Intranet sites in compatibility mode is ticked in compatibility settings.
  • I am forcing document mode for my intranet pages by using the meta tag approach: <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  • This results in Browser mode set to IE8 Compat, and Document mode set to IE8 Standards.

So far this has all been good, no issues whatsoever, pages layout as I expect, etc etc.

Just recently some functionality was added (I won't say what at this stage - the question is about page rendering modes) and the page is laying out incorrectly. Changing the Browser mode to IE8 in Developer Toolbar (or unticking in Compatibility View Settings) fixes the layout issues. This surprised me as the Document mode is unchanged.

So to re-cap the combinations:

  • Broswer Mode=IE8 Compat, Document Mode=IE8 Standards [broken]
  • Broswer Mode=IE8, Document Mode=IE8 Standards [works]

The document mode is the same, the only thing changing is the browser mode. I thought the document mode is the only thing that should affect page rendering, and that browser mode only affects, basically, the UA string sent in the request. Am I correct, or do I have it wrong? If I am correct then once document mode is determined then browser mode should have no affect at all on rendering. Is this a bug in IE8? Or am I wrong? Does the browser mode affect rendering even if the same document mode is used?

Limitations:

  • I have no control over unticking Display intranets in compatibility view in compatibility view settings for all our users (corporate intranet, we have other legacy apps, too much testing to make sure they all work in Standards mode, would never get approval to make that type of global change).
  • I have no option to upgrade browser for all users. We only just finished a 6+ month project upgrading from IE6 to IE8.
quimbylips
  • 23
  • 4

1 Answers1

0

I realise this is a very old question, but in case it helps anyone:

According to this answer to the question IE8 browser mode vs document mode, browser mode does "just" set the User-Agent string. However, since this value is used when evaluating IE conditional comments, the browser mode can have an effect on rendering if (a) any code tests directly against the UA string, or (b) there are IE conditional comments in the code.

A browser mode of IE8 Compat would normally evaluate to a UA string of MSIE 7.0, so if you have any conditional comments checking for if lt IE8, for example, that could be the source of your issue.

Community
  • 1
  • 1
heldinz
  • 78
  • 7
  • Thanks - issue was with some vendor code but I did figure out it was setting classes on the body tag based on the UA string, which as you said would have resulted in some odd behaviours. Thanks for confirming exactly what the browser mode does. – quimbylips Jul 07 '15 at 10:58