If you specify the X-UA-Compatible
value via the META tag or HTTP response header, the document mode will change to the value specified, just like in Desktop IE.
Unlike changing the browser mode using the F12 Developer Tools, the document mode does not impact the User-Agent
string sent to the server. In fully-patched versions of IE, the X-UA-Compatible
setting does impact the User-Agent
shown to JavaScript in the navigator.userAgent
property, although that value is unchanged if the document mode
setting is changed using the F12 developer tools.
You can explore the results of sending X-UA-Compatible
by viewing
http://webdbg.com/ua.aspx
and
http://webdbg.com/ua9.aspx
The first page does not specify a document mode (and thus gets the default) while the latter specifies the document mode is IE9. If you click the Document mode link, you can see that the document's mode is sensitive to the X-UA-Compatible
directive, even if the User-Agent in the request headers is unchanged.
In contrast, to change the browser mode of the Web Browser control within your application, you must set the FEATURE_BROWSER_EMULATION
registry key, specifying the name of your executable and the desired mode.
A customer requirement that "no registry changes may be made" is goofy. It's reasonable to say: "We don't want any registry manipulation that would impact IE or another program." It's unreasonable to say: "We don't want any registry manipulation at all" considering that the mere act of running your executable results in changes to the registry.