Internet Explorer 11 downgrading document mode

5.6k Views Asked by At

With developer mode open, i visit a site A, and see that document mode is set to Edge (default). When following a link on that site to site B, I see that IE automatically downgrades the document mode to 5(!), breaking the site. Furthermore, it's not possible anymore to change document mode to 10 or 9 (it was on site A), rather only 5,6,7 and edge are available.

Site B has this tag set in the head:

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

Internet Explorer has no compability mode settings for Site B.

I am completely lost here, what could cause IE to downgrade its document mode like this?

1

There are 1 best solutions below

0
L84 On

I have a feeling this may be a <!DOCTYPE> issue. With IE 11 document modes are considered deprecated and Microsoft is using the <!DOCTYPE> to render the page.

If a site has the following <!DOCTYPE> declaration then it will render in Standard mode:

HTML 4.0 and higher

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

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/html4/strict.dtd">

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

XHTML with or without a system identifier

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Unknown

<!DOCTYPE html>

If a site has the following <!DOCTYPE> declaration then it will render in "Almost Standards" mode (standards mode in IE7):

XHTML Transitional or Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhmlt1-transitional.dtd">

HTML 4.0 or HTML 4.01 Transitional or Frameset with a system identifier

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

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

If a site has the following <!DOCTYPE> declaration then it will render in Quirks mode (aka IE 5):

HTML 4 and lower, or no DOCTYPE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

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

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

None

(Source of above list.)

If Site B has a no doctype or one from the last list, it will render in Quirks mode which is equal to IE 5.