I'm developing an application which creates a HTML report at the end, it outputs the js and css files separately then loads the files normally. But Internet Explorer 8-10+ refuses to load the CSS files due to "CSS was ignored due to mime type mismatch", but of course, the MIME can't be modified, as they are local files and not being served by a server.
So in short:
So, does anyone have any idea's on a work-around for this issue?
HTML loading of CSS:
<head>
<title>Results</title>
<link href='resources/bootstrap.min.css' rel='stylesheet' type='text/css' />
<link href='resources/bootstrap-responsive.min.css' rel='stylesheet' type='text/css' />
<link href='resources/style.css' rel='stylesheet' type='text/css' />
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
</head>
Note: According to Microsoft, the fix is: "Ensure style sheet file is delivered with the proper HTTP response header, which includes a content type of text\css. See MIME-Handling Changes in Internet Explorer for more information.", but obviously impossible, as no header's are being sent across the wire......
I'm on Windows 8.1 using IE11 with the same issue. This is how I fixed it:
I hope this helps other people out there.
Found out the issue by testing on a few different machines, it turns out if you have a CSS file set to open with a particular program, it will prevent IE from loading, and will give the above error message -_-
Also mitigating the potential problem by including a CDN version of the CSS at the end of the file (the report has to work with and without internet)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With