SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

        <clear />
        <add name="X-UA-Compatible" value="IE=EmulateIE8" />

Here is IE page to read

Hope it helps,


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
Did this solution actually work? Will it fix this?… – bgmCoder Feb 23 '15 at 5:16

Your Answer


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.