IE8 breaks compatibility view if embedded as an activeX

930 views Asked by At

Using it as a CDHTMLDialog from MFC, I noticed that for some sites (such as wikipedia.org) the embeded IE reports a documentMode property of 7, while using the IE app properly presents the documentMode property as 8. Same thing is true for IE11 too (documentMode property is 11 when launched standalone and 7 when used embedded). What's going on here ?

1

There are 1 answers

1
Rami Sarieddine On

IE’s Compatibility View Settings determine precedence of how the site is rendered . By default these settings force all intranet sites into Compatibility View regardless of DOCTYPE. You can use X-UA-Compatible which overrides the Compatibility View Settings, so the page will render in standards mode regardless of the browser settings. The X-UA-Compatible meta tag allows you to set which version of Internet Explorer the page should be rendered as. For example, using IE=Edge tell the browsers to render the latest.

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