internet-explorercross-browsercompatibilitymicrosoft-edgequirks-mode

What happens if Internet Explorer compatibility view not specified


While studying about the compatibility view of Internet Explorer, I've read that it is unnecessary to put

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

in a HTML document unless it is for 'Local Intranet'. According to the articles I have read,

if no X-UA-Compatible meta tag is present in a document, the browser checks the user's compatibility view settings. If the user doesn't have certain website specified in the views list, the browser checks for the presence of <!DOCTYPE declaration and if it is present, it automatically renders as the latest Standards Mode, otherwise it renders as Quirks Mode.

If that's the case, I wonder what would happen in these situations below,

  1. If an user's browser is very old (eg. IE 6 or 7) and there is no compatibility meta tag specified. Will it render as latest Standard Mode if DOCTYPE is present? then how the browser can handle the latest functions and CSS etc ?

  2. I have read about Quirk Mode too, but what exactly is the Quirk Mode? How does it affect the rendering?

  3. If <meta http-equiv="X-UA-Compatible" content="IE=7"> is specified in the document, will it render as IE7 for ALL browsers even the browsers are the latest?


Solution

    1. If an user's browser is very old (eg. IE 6 or 7) and there is no compatibility meta tag specified. Will it render as latest Standard Mode if DOCTYPE is present? then how the browser can handle the latest functions and CSS etc ?

      Yes, provided the DOCTYPE is one that triggers standards mode, e.g. one for a Strict DTD that contains all the necessary bits (public identifier, system identifier, etc). Standards mode is available in Internet Explorer 6 and later.

      It handles whatever it understands to the best of its ability.

    2. I have read about Quirk Mode too, but what exactly is the Quirk Mode? How does it affect the rendering?

      This is too broad to answer in depth, but see http://jkorpela.fi/quirks-mode.html. In short, quirks mode is a compatibility mode designed for really old (think 20 years old) and/or really broken sites.

    3. If <meta http-equiv="X-UA-Compatible" content="IE=7"> is specified in the document, will it render as IE7 for ALL browsers even the browsers are the latest?

      Yes, up to and including Internet Explorer 11.

    Despite the word "edge", the X-UA-Compatible header and meta tag are completely irrelevant to Microsoft Edge, and so nothing in this topic applies to that browser:

    Developers who are new to X-UA-Compatible and reading this today may be confused by the use of the word "edge" — the X-UA-Compatible header was introduced in IE8, which is at least 6 years older than the new Windows 10 browser Microsoft Edge, and "edge" in this case refers to "the latest, 'cutting-edge' version of IE's rendering engine". It is not at all related to Microsoft Edge, and for obvious reasons you cannot actually tell IE to render as Microsoft Edge.