none
Internet Explorer 11 on Windows 7 - How do I tell where the the Enterprise/Document Mode of a page was set RRS feed

  • Question

  • We are preparing to roll out IE11 to about 12,000 desktops.  We have determined which modes (Document Modes or Enterprise Modes, in a couple of cases Compatability View) each application needs to be run in and added the appropriate settings to a central Enterprise Mode Site List (EMSL) XML file.  For historical reasons there are various settings in the Group Policy delivered from Active Directory and in the HTML tags of application pages thart specify various modes.

    Going forward we are looking for a way to conclusively identify where the settings for a page have come from.  From experimentation we have found that if you open the F12 developer tools and open the console then go to the navigation tab, click start recording, refresh the page then click stop recording then in the console:

    * If the mode was set by the Doctype tag of the page it will state in the console output that the page targets a particular mode

    * If the mode is set using Group Policy then it will state in the console output that the mode was set by Group Policy

    * If the mode is set using a meta X-UA tag in the page (see http://sbjoomla.org.uk/IE11/withdoctypeandmode10.html) then there will be no mention in the console output

    * If the mode is set using the EMSL XML file then there will be no mention in the console output

    We have been advised by Microsoft support that the EMSL XML file *should* take precedence over all other settings, however our experience, and comments from application vendors, have given us doubts.  Our question, therefore is how can we categorically tell whether the setting that puts a page in a particular mode in IE11 has come from the EMSL XML file, Group Policy, the Doctype tag or an meta X-UA tag.

    Thanks

    Stephen


    -- Stephen Booth (http://sharepointbydummies.blogspot.com/)

    Thursday, March 17, 2016 5:59 PM

Answers

  • Hi Stephen,

    f12>Emulation tab,

    the highlighted area under the Document Mode dropdown lists how the emulation mode (documentMode) was established......

    You may see situations where (in the EMSLM) you have specified Enterprise Mode or IE8 mode or IE7 mode but the Emulation tab of dev tool shows that a documentMode of IE5 (Quirks mode) was established by the Enterprise Site mode list, x-ua header/meta or user Compatibility view list......

    This is because the REAL IE versions (prior to IE9) treated web documents ((x)html documents) that did not have a document type declaration (or the DTD was proceeded by a html comment tag. <!-- this is a comment -->) as non-conforming to the w3 recommendations and use the legacy IE5 rendering engine to support proprietary MS Quirks mode (also known as IE5 document Mode) like css expressions, MSO prefixes, depreciated html attributes like backgroundcolor, align, and haslayout (a non-standard attempt at the css display property).

    Note that there is a non-conforming document type declaration for HTML4 (typically machine generated by the Tidy HTML validator ... a Firefox addon) in common use that your intranet sites may be using.

    It looks like this.....

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    (which is an INVALID shorthand version of the full dtd

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd"> )

    (see also W3C valid document type declarations - recommendations)

    so..... if you place a page/path/domain in IE8 Emulation mode or lower, but in the Emulation tab of dev tools you see that Quirks mode is established... then this is the correct (emulation) behaviour..... (its very, very confusing I know!)...

    Strictly speaking.... web developers should code to the W3C 'Living Standards' recommendations for html5 and move away from proprietary 'features' of legacy IE and Netscape browsers... (that is conform to validation from the http://validator.w3.org/nu (or Visual Studio Pro and Community versions has built-in validation and intellisence autocompletion.... I am not familiar with the sharepoint IDE, but I would presume it would have intellisence and tag autocompletion also). You should turn on those features in your MSIDE...

    Understandably, this may be a major undertaking for the enterprise and the dente for the Enterprise Mode.... However in situations where you find a page is rendered in Quirks mode because it is using the (invalid)/abbreviated ) html4 dtd...(even though you have specified IE8 or 7 emulation in the EMSL or x-ua header/meta) or there is a valid DTD proceeded by a HTML comment tag (<!-- comment -->), THEN

    you should take the time to correct the issue by either

    1. use the valid html4 dtd (above)

    or

    2. remove any comment tags that proceed the valid DTD.....

    doing this means that (as intended by the original developer) the document targets a valid HTML version/DTD, so if it is intended to target IE8 (is in the EMSL as emulating IE8) then the DocumentMode (emulation mode) as seen on the Emulation tab of dev tools is IE8 or IE7 (viz not Quirks)....

    Now.....the IE dev tool is your friend.....

    fist set up your IE testing environment on your machine....

    Tools>Internet Options>Advanced tab, check "Always record developer console messages"... save your changes......this will list errors and messages in the console tab of dev tools that are otherwise suppressed..(not shown to the user or listed in the console)....

    Navigate to an intranet site that your want to determine which emulation mode it should use in the EMSL....(File>Properties menu in IE will confirm that it is mapped to the Intranet zone)

    1. open the dev tool>Emulation tab and observe how and if the Emulation mode is established....

    (by default IE11 renders all web pages in a 'standards' compliant mode (sometimes called Edge mode), unlike IE8 (or lower) emulation even if there is a missing or invalid DTD..... IF a lower emulation mode has already been established with a EMSL entry or x-ua header/meta then it will assume that emulation mode (of coarse)

    2. Select a lower emulation mode from the drop-down list (document mode) on the Emulation tab, typically IE8 emulation (on the assumption that you are migrating an intranet application that has been designed/tested/targeted for an XP client using the REAL IE8.... Observe the established documentMode (IE8 or Quirks). If quirks mode is shown, then the cause is from one of the reasons given above..... if you now select the console tab it will list the markup errors.... typically if there is no DTD or an invalid DTD a markup error...

    HTMLXXX - invalid document type declaration... consider using the HTML5 DTD (<!doctype html>) instead..

    is listed... this indicates that although the website may have been developed to target the real XP/IE8... it relies on legacy Quirks features... you should list this page in the EMSLM to use IE8 emulation. But remember this page/domain, although it is listed in the EMSLM to use IE8 emulation will show Quirks mode has been established by the EMSLM on the Emulation tab.....

    3. At this stage you may like to click the "Persist emulation settings" on the Emulation tab of the dev tool (looks like a small cog overlaying a rectangle on the lhs of the emulation tab of dev tools)... this ensures that as you test the site, the same emulation mode is persisted during navigation....

    Without closing the dev tool return to the web browser and proceed with your testing...

    If a scripting error is encountered then focus will return to the dev tool Debug tab and your can troubleshoot the issue.... typically you may find addEventListener is undefined errors... this indicates that in fact the website has NOT been designed/tested for IE8 browsers, but instead has been designed for web standards. Return to the Emulation tab and choose a higher emulation mode (IE9 or higher) and return to your testing..... this may indicate that to work properly the site/page should be placed in IE9 or higher emulation mode in the EMSLM. Typically though developers will have already used an x-ua meta or header to force IE9 (or higher) emulation...

    you may like to browser some of the links produced from this web search

    http://www.bing.com/search?q=how+microsoft+IT+deployed+enterprise+mode

    I've spent quite some time trying to answer your question for you.... I trust that I have pointed you in the right direction.... I see from your question that perhaps your client is using JUMLA and/or WORDPRESS... In documents that are using an xhtml DTD you may see markup errors in the Console tab of the form

    tagname is not self-closing... cannot parse element....

    (the xhtml namespace is less forgiving that the vanilla html, (requires lower case tagnames for example)... see http://www.sitepoint.com/web-foundations/differences-html-xhtml/

    and W3c - Why validate?


    Rob^_^

    Friday, March 18, 2016 4:23 AM