1

is there a possibility to Change the submitted x-ua-compatible meta-tag in SharePoint 2013 for a specific browser (by incoming user-agent)?

Background is, that IE11 in IE8-mode or edge mode will not be able to render pages at all or at least correctly. But IE11 in IE10-mode will do the job. Setting the X-UA-Compatible via Web.config does not work.

Thanks

3

All SharePoint 2013 biult-in masterpages contain a meta tag:

<meta http-equiv="X-UA-Compatible" content="IE=10"/>

forcing IE 11 into IE 10 mode.

This has been working for me without any issue, though I've also installed the ASP.NET updates to make sure IE 11 is recognized properly:

http://msdn.microsoft.com/en-us/library/ie/hh869299%28v=vs.85%29.aspx

UPDATE

The above article refers to the following ASP.NET hotfixes:

http://support.microsoft.com/kb/2600088 (.NET 4)

http://support.microsoft.com/kb/2600100 (.NET 2.0 SP2 and .NET 3.5 SP1)

http://support.microsoft.com/kb/2608565 (.NET 3.5.1)

Took me a moment until I figured out which one applied to my environment. So make sure to try them all. If the hotfix does not solve the issue, make sure to use the meta tag I mentioned earlier to put IE 11 into IE 10 mode.

  • Thanks for the answer, but the HotFix says it does not apply. – TGlatzer Nov 25 '13 at 12:29
1

Okay, since neither the X-UA-Compatible worked correctly (the root cause seems to be a browser-sniffing issue), nor the hotfixes applied. We made our own "hotfix".

The user-Agent of IE11 can be parsed with a simple regex and we used the opportunity to rewrite the user-agent so SharePoint thinks, it is talking to an IE10 and everything will work fine. This can be done with URLRewrite on the SharePoint Server itself.

<rewrite>
  <rules>
    <rule name="Set UserAgent">
      <match url="(.*)" />
      <conditions>
        <add input="{HTTP_USER_AGENT}" matchType="Pattern" pattern="Mozilla/5.0 \(.*Trident/7.0;.*rv:11.*\).*Gecko" ignoreCase="true" negate="false" />
      </conditions>
      <serverVariables>
        <set name="HTTP_USER_AGENT" value="Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)" />
      </serverVariables>
      <action type="Rewrite" url="{R:0}" />
    </rule>
  </rules>
</rewrite>

Think of adding "HTTP_USER_AGENT" to the Server-Variables or it will not be able to rewrite it. By the way - we are not sure if an action is necessary or Action: "None" will also apply. But this here does the trick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.