Among the ways to change the compatibility mode for page two of them seems promising:
- Via
X-UA-compatible
HTTP header: The web server has requested a legacy document mode via an HTTP header.
- Via
X-UA-compatible
meta tag: The webpage developer used a meta tag to specify a legacy document mode.
SharePoint 2010's default master page hardcodes X-UA-Compatible
meta tag, and meta tag takes precedence over HTTP header, so this can't be done on HTTP level. This leaves us with the second option.
It seems that the first X-UA-compatible
meta tag encountered on the page is used by IE (although it's ambiguous in different articles and missing in MSDN documentation). If you write SharePoint UserControl or WebPart you might add this code e.g. in Page_Load()
method to add this header as the first one:
HtmlMeta metaEdgeIE = new HtmlMeta();
metaEdgeIE.HttpEquiv = "X-UA-Compatible";
metaEdgeIE.Content = "IE=EDGE";
Page.Header.Controls.AddAt(0, metaEdgeIE);
where HtmlMeta
comes from System.Web.UI.WebControls
namespace.
By iterating through Page.Header.Controls
you could probably also find and remove the meta tag added by default by SharePoint, although the code above seems enough to trigger Edge mode in IE11.