问题
I have a bootstrap enabled xpages application, which renders perfectly in chrome.
The same application, that when loaded in IE11, all the styling is out of place. However, as soon as I refresh the page, everything styles correctly, and stays so for the duration of the session. If I close IE, re-open, load page, wrong style again, refresh, correct again for the session....
It looks like it is trying to force IE7 document mode
Any idea's what is causing this? I use <meta content="IE=edge" http-equiv="X-UA-Compatible">
in my application theme, so is correctly listed with the head tag....
Thanks
回答1:
Try setting X-UA-Compatible in the response header instead - for instance by adding the following to your custom control:
<xp:this.beforeRenderResponse><![CDATA[#{javascript:
var response = facesContext.getExternalContext().getResponse();
response.setHeader("X-UA-Compatible", "IE=edge");
}]]></xp:this.beforeRenderResponse>
回答2:
Your browser might be running in Enterprise mode:
https://docs.microsoft.com/en-us/internet-explorer/ie11-deploy-guide/fix-compat-issues-with-doc-modes-and-enterprise-mode-site-list
You might even want to consider the following answer before investigating any further with XPages: https://stackoverflow.com/a/26348511/3256564
来源:https://stackoverflow.com/questions/44523440/xpages-ie-document-mode