I'm using the new Internet Explorer 11 developer tools to switch the document mode to "8", but conditional comments are still ignored, that is, they are not properly parsed and behave like normal comments. So any referenced file inside the conditional comment is not requested/loaded by the browser.
Why does this happen? Is it a bug?
If you think that this is indeed a bug that needs to be fixed, please go in and say that you too can reproduce this on the Microsoft bug report that is reported for this issue:
Conditional comments do not work when emulating document modes via F12 Developer Tools.
Update: This issue has been reported to be fixed in the mentioned bug report.
This worked for me and seems like the most elegant/easy fix (Internet Explorer 10 and Internet Explorer 11 I guess are the only browsers that support
-ms-high-contract
):I recently ran into the same problem. I also found that some conditional comments work:
gt
andlt
worked finegte
andlte
never workedSo one potential solution would be to change the conditional statements to use the
gt
andlt
operators.The other alternative, which I found more useful, was to use a service like browserstack.