A well-written CSS file is not loaded using IE, but it can be displayed normally using a browser such as Firefox. Read this article Method 2 just know, use IE local directly open then call file protocol when the CSS does not load, put the written file into the local Apache server, and then use IE Open Call HTTP protocol, display normal, problem resolution.
Original location: http://www.uedsc.com/css-mime-type-mismatch.html
What is a MIME type?
MIME (Multipurpose Internet Mail Extensions) Multipurpose Internet Mail Extension type is the type of file that is set up with an extension that is opened by an application, and when the extension file is accessed, The browser will automatically open with the specified application. Many are used to specify some client-customized file names, as well as some ways to open media files.
Why is there an error?
In IE9 above the Internet Explorer, especially in the local environment, without the configuration of the server environment, will encounter outside the chain of CSS files can not be loaded successfully, resulting in the desired effect is not implemented! When you encounter a problem like this, you will see an error "SEC7113:CSS is ignored due to MIME type mismatch" in the console of the debug tool that comes with IE.
Microsoft has added a file name recognition program from IE9, which appears in standard mode above IE9, and is not a problem in compatibility mode.
Workaround
Now that we know the cause of the error, we can solve the problem in a targeted way, and the following includes the steps and methods of detection, and you can skip certain steps based on your actual situation.
1. Testing Link Label
The link tag is the label that we introduced to the stylesheet to see if the Type=text/css attribute is missing, the complete link tag example.
<link rel=stylesheet type=text/css href= "Style.css" >
If you find that adding no effect later, then look down.
2. Static page Cannot display style
In fact, many people encounter this problem is in the local directly using the browser to open the Web page, that is, not through the http: Protocol way to browse the page, but through the file: protocol to open the Web page. The CSS cannot return the correct MIME, possibly due to the reason of your system.
Go to Registry Editor to see if the Content Type inside the hkey_classes_root\.css is text/css.
3. The server environment cannot display the style
Styles cannot be displayed in a server environment, whether local or remote, the solution is the same, since the server cannot return the correct document type, we need to configure it manually.
IIS Server
For the IIS server by configuring the Web. xml file, the server is required to output the correct CSS mine information.
<mime-mapping><extension>css</extension><mime-type>text/css</mime-type></ Mime-mapping>
Apache Server
When the Web server wants the browser to send a document, it prefixes the document with a response header that contains the data that tells the browser how to interpret the document, and one of the most important parts of the metadata is the Content-type in the last line. It tells the browser how to render the content. For example, the code used by the browser to display JPEG and GIF is different.
And here we need to properly configure the CSS file Content-type, in the Apache installation directory has a conf folder, inside the Mime.types file is the response header document type configuration.
Add the code to the Mime.types file, and then restart the Apache server.
Text/css CSS
If not, try adding code to the httpd.conf file to load the Mime.types configuration file.
<ifmodule Mime_module>typesconfig conf/mime.types</ifmodule>
This article is to ask the author of the network to ask the network published, and asked the Web editor, reproduced please indicate the source and this article link. This site is reproduced in addition to the article, are the original site or translation, welcome any form of reprint, but please be sure to indicate the source, respect for the work of others. Reprint Please specify: The article is reproduced from: Ask the net» Solve ie9+ in CSS due to MIME type mismatch and ignored the problem this article title: Resolve ie9+ in CSS due to MIME type mismatch and ignored the problem this article address: http://www.uedsc.com/ Css-mime-type-mismatch.html
Workaround for "Sec7113:css ignored due to Mime type mismatch" in IE browser