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

1 Answer 1


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,


  • 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. Feb 14, 2013 at 16:08
  • Did this solution actually work? Will it fix this?:sharepoint.stackexchange.com/questions/132749/…
    – bgmCoder
    Feb 23, 2015 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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