Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm having problem with document mode. In workspaces we force to document mode into ie8, like

<meta http-equiv="x-ua-compatible" content="IE=8"/>

How can I detect what document mode all pages are in?

I've tried to use ConditionalExpression in CssRegistation without any luck, because it detect "Browser mode" and not the "document mode". How can I detect the document mode and give a different css file to the client?

What I wan't: Workspace , for IE users I want to force the browser into "document mode = ie8" and give the user another css file. In all other browsers (FF, Chrome..) I don't want to give the users the IE8.css file.

I've also tried to use this inside the css file , without any luck

<!--[if IE 8]> ..... .. styles\ie8.css <![endif]-->
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

recently we had the same probleme with our site which should open in IE8 document mode. Whenever we set to display IE8 mode no changes!

To fix this we had modified web.config file and added these lines

<configuration>
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=EmulateIE8" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

Here is IE page to read

Hope it helps,

Andrew

share|improve this answer
    
Upvoted, Andrew is right, it's the cleanest way to ensure the headers are properly set if you have access to the web.config on the WFE(s). Be carefull about the casing of of the X-UA-Compatible as well and put it as the first tag under your head tag. –  Francois Verbeeck Feb 14 '13 at 16:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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