Stuck on IE7 compatibility view

86 views
Skip to first unread message
Assigned to chy...@gmail.com by aaron....@cerner.com

Simon Silitonga

unread,
Mar 15, 2021, 2:17:51 PM3/15/21
to Cerner FHIR Developers
Hello,

We are having an issue with our SMART App to load in MPages. It seems like MPages continue to load the app in IE7 compatibility view. I've temporarily modified our app to print out the UserAgent request header to determine this. I've ensured that the app 1) Has HTML5 DOCTYPE; 2) has X-UA-Compatible meta tag as the first head element and; 3) Loads cerner-smart-embeddable-lib. What am I missing?

Thank you,
Simon Silitonga

Issue Summary: Stuck on IE7 Compatibility View
CorrelationId: 46161b72-2a70-4824-b99f-f31e969694ee
RequestId: 735af62a-1187-4ab7-a008-0643e804d20c

Yixuan Chen (Cerner)

unread,
Mar 17, 2021, 6:08:39 PM3/17/21
to Cerner FHIR Developers
Hey Simon,

I think you are using the userAgent string to determine the compatibility mode. It is not the recommended way of determining what browser is in use. Some knowledge about the embedded browsers being used within Millennium applications I would like to share with you:

The current embedded browser within Millennium applications is the Microsoft web browser control. There are a few key points to know about this embedded browser:

  1. The embedded web browser document mode is based on the standalone Internet Explorer browser installed on the machine.
  2. The embedded web browser and standalone Internet Explorer browsers are not the same and have differences in how they function.
  3. The embedded web browser control runs in compatibility mode by default, which is document mode 7.

The first point above is important because it will be the determining factor for what document modes are available within the embedded web browser control. If the standalone version of Internet Explorer is IE11, then the embedded browser can render using the IE11 document mode. However, as called out in the third point above, the default behavior for the embedded web browser is to utilize document mode 7 (IE7 compatibility mode).
In order to get the embedded web browser to render using a newer document mode, the Compatibility Meta Tag (X-UA-COMPATIBLE) can be added to the web application to utilize the latest browser engine available. The Microsoft Controlling WebBrowser Control Compatibility blog post provides a great writeup of this information and how that meta tag can be leveraged. The setting of ‘edge’ (not to be confused with Microsoft Edge) will render our framework using the latest document mode available from the standalone Internet Explorer browser (currently IE11).


One major caveat of the embedded web browser control is that the userAgent string will always show up as MSIE7. This userAgent string is how many web developers attempt to determine what browser is being utilized. However, this is not the recommended way of determining what browser in use. This Mozilla article provides alternatives to using the userAgent string. There are registry keys that allow for overriding this and forcing the userAgent string to show a newer value, but these cannot be utilized for Millennium applications as there is a mixture of multiple web applications used under the same parent application.

- Yixuan (Cerner)

Farhan Ahmad

unread,
Apr 9, 2021, 11:25:10 PM4/9/21
to Cerner FHIR Developers
Hi, Simon,

Were you able to figure this out?  We are also running into a similar issue where PowerChart is staying in the compatibility mode even with the meta tag and the doc type tag.

Thanks!
Reply all
Reply to author
Forward
0 new messages