views:

76

answers:

2

I have different sites being served up, essentially running off the same code. One page renders correctly, while the other appears to have no CSS available.

When I bring up the IE9 developer console for the broken page, I see:

SEC7113: CSS was ignored due to mime type mismatch

So that explains why the pages render improperly, but the question is, why am I seeing that error on one page, but not the other?

Using fiddler, the same CSS is served to both sites, and both sites have a the metatag:

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

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

+3  A: 

This doesn't look like an IE emulation thing - it sounds like the CONTENT-TYPE in the response isn't "text/css". It looks like IE9 enforces that files that are expected to contain CSS are actually marked as such.

Just out of interest, are the CSS pages processed in any way? i.e. are they rendered by an ASPX page to allow you to inject CSS? If that's the case then you may want to make sure your page declaration at the top includes the ContentType declaration, e.g.:

<%@ Page Language="C#" ContentType="text/css" %>
Mike Goatly
Yes, the css files are stored as binary blobs, then streamed down to the client. These files didn't have the proper headers set. Once we set the headers, everything worked.
Alan
+1  A: 

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

Sites outside of the trusted zone will not render the css if there is a missing content-type header.

Alan