-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, Master
-
Fix Version/s: 7.0.0 DXP FP33, 7.0.0 DXP SP7, 7.0.5 CE GA6, 7.0.X, 7.1.X, Master
-
Component/s: Liferay Themes > Classic
-
Branch Version/s:7.0.x
-
Backported to Branch:Committed
-
Git Pull Request:
Issue
x-ua-compatible directive not respected in IE9 due to wrong position in head tag
Steps to reproduce
- Start a clean bundle
- Open an IE9 and access liferay
- Note that the compatibility icon is displayed and we can switch to compatibility mode
Not respecting the IE=Edge directive - Check source code's <head> tag and confirm that x-ua-compatible position is after some css is loaded
- In webapps/ROOT/html/common/themes/top_head.jsp, move the loading of css after the top_meta tags.
<%@ include file="/html/common/themes/init.jsp" %> <%@ include file="/html/common/themes/top_meta.jspf" %> <%@ include file="/html/common/themes/top_meta-ext.jsp" %> <liferay-util:dynamic-include key="/html/common/themes/top_head.jsp#pre" />
- Remove Tomcat's temp/work to clear cache and restart Liferay
- Access liferay again in IE9
- Note that the compatibility icon is not displayed because x-ua-compatible is properly respected
Actual results
IE=Edge directive not respected and compatibility icon is displayed
Expected results
IE=Edge directive respected and compatibility icon is NOT displayed
Reference
https://msdn.microsoft.com/en-us/library/jj676915%28v=vs.85%29.aspx
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.