Document Modes in IE (Internet Explorer) | UA - User Agents

Standards Based Development

ie8

Four rules about how ie handles doctype, X-UA-Compatible meta element and header, Developer Tools, and Compatibility View Settings that follow the diagram below, from top to bottom:

  1. Developer Tools settings override all Document Modes for documents displayed in a tab.
  2. X-UA-Compatible meta element and then header override Compatibility View Settings and the doctype unless X-UA-Compatible value is EmulateIE7 or EmulateIE8.
  3. User's Compatibility View Settings override the Microsoft Compatiblity View List.
  4. If none of the above apply, doctype determines if the document renders in ie8 Standards, ie8 Almost Standards or Quirks Mode.
IE8 Document Mode Determination Flow Chart Diagram Determining ie8's Document Mode
IE8's Compatibility View Request to Web Server Diagram ie8's Compatibility View Request to Web Server Diagram

How ie8 Determines Document Mode

ie9

IE9 Document Mode <iframe> Impact Determination Flow Chart Diagram ie9 Document Mode iframe Impact Determination Flow Chart Diagram

meta X-UA-Compatible / and ie9

The following table indicates which document mode that Windows Internet Explorer 9 uses based on the X-UA-Compatible value.
X-UA-Compatible valueDocument modes

IE=5

Quirks mode

IE=7

IE7 mode

IE=8

IE8 mode

IE=9

IE9 mode

IE=10

IE10 mode

IE=edge

The highest supported document mode of the browser

IE=EmulateIE7

IE7 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

IE=EmulateIE8

IE8 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

IE=EmulateIE9

IE9 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

IE=EmulateIE10

IE10 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

How to Change User Agent String in Browser Mode with f12 Developer Tools in IE9 How to Change User Agent String in Browser Mode with f12 Developer Tools in ie9

ie10

How f12 Developer Tools Settings Impact Browser Mode and Document Mode in ie10 Diagram

References and Resources