IE9 ignores CSS for specific pages?

I have different sites serviced, essentially, escaping from the same code. One page renders correctly, and the other, apparently, does not have CSS available.

When I raise the IE9 developer console for a broken page, I see:

SEC7113: CSS was ignored due to mime type mismatch

So this explains why the pages do not display correctly, but the question is why I see this error on one page, but not another?

Using a violinist, the same CSS is used for both sites, and both sites have a meta tag:

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

I know that IE9 is still in beta, but I'm trying to figure out why this is a problem with my site.

+7
css cross-browser internet-explorer-9
source share
2 answers

This doesn't look like IE emulation thing - it looks like CONTENT-TYPE does not have β€œtext / css” in the response. It seems like IE9 provides that files that are expected to contain CSS are actually marked as such.

Just out of interest, are CSS pages handled in any way? that is, they appear on the ASPX page so you can inject CSS? In this case, you might want to make sure that the ad on your page at the top includes a ContentType ad, for example:

 <%@ Page Language="C#" ContentType="text/css" %> 
+12
source share

It turns out that IE9 will ignore the missing content types for all sites that are in your "trusted zone".

Sites outside the trusted zone will not display css if the content header header is missing.

+5
source share

All Articles