Title:
<meta http-equiv="x-ua-compatible" content="IE=Edge"> is being ignored in the header
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Mark Berning / ()
Created: 04/27/2018
Components: Language, Page Processing Tags
Versions: 2016
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: CF 2016 Enterprise update 5 build 303689 / CF14
Priority/Frequency: Normal / All users will encounter
Locale/System: English / Linux RHEL 6.4
Vote Count: 0
Problem Description:
The purpose of the <meta http-equiv="x-ua-compatible" content="IE=Edge"> is to force the page to be rendered using the Edge Documentation Mode and the compatibility view is set in Internet Explorer. This allows the page to be properly rendered using the correct CSS styles and . When Coldfusion injects script code in the <head> tag, it places it before existing tags like <meta>. This causes an issue as the <meta http-equiv="x-ua-compatible" content="IE=Edge"> needs to be the very first tag in the <head> in order to be processed by Internet Explorer as documented here:
https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/jj676915(v%3dvs.85)
The X-UA-Compatible header isn't case sensitive; however, it must appear in the header of the webpage (the HEAD section) before all other elements except for the title element and other meta elements.
This becomes an issue when <script> tags are injected in the <head> at the beginning by certain tags (there are probably many more tags that inject in the header): <cfchart> <cfform>
Steps to Reproduce:
1) Set compatibility view in Internet Explorer 11 for the domain to be tested
2) Create a page with compatibility and <cfform> and/or <cfchart>:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
</head>
<body>
<cfform action="." >
<cfinput name="date" validate="date" value="#dateformat(now())#">
</cfform>
</body>
</html>
3) Open page in IE
4) Verify the page Documentation mode using Developer Tools (F12)
Actual Result:
Documentation mode: 7
Expected Result:
Documentation mode: Edge
Any Workarounds:
You can get around this by using <cfheader name="X-UA-Compatible" value="IE=edge">
Attachments:
Comments: