Internet Explorer “CSS was ignored due to mime type mismatch” on local files (no server)

后端 未结 5 1472
忘掉有多难
忘掉有多难 2020-12-03 18:41

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+

相关标签:
5条回答
  • Kyeemagh, 23 May -14

    Hi to all of you who have the problem with Internet Explore that showing "CSS was ignored due to mime type mismatch" on local files (no server).

    I have Win7 with IE11 and i found the solution by doing 2 days searching in the Internet... with many coffees.

    Please click on the first link then scroll down to the "3 Answers" and read the instructions how to solve the problem! In my laptop works ok.

    CSS not rendered in IE 10

    and then for original information and ownership click on:

    http://nirsoft.net/utils/file_types_manager.html

    I hope it helps.

    Eventually I can see correctly all my web pages that I'm making, from my C: driver - no server, on the IE11 browser.

    Remember to have the correct coding in your html page at section, that link to an external css file.

    • Please pass it to anyone who need this particular free help!

    with many thanks,

    Dionysios

    0 讨论(0)
  • 2020-12-03 19:00

    I'm on Windows 8.1 using IE11 with the same issue. This is how I fixed it:

    1. On your computer search for "regedit.exe" (go to the start menu and click on the search button on the top-right corner of the screen).
    2. Once regedit opens up, on the left column click on "HKEY_CLASSES_ROOT" and then on ".css"
    3. On the right column double-click on "Content Type". This will open up a dialog box.
    4. In the dialog box change "value data" to "text/css".
    5. Click "Ok" and that's it.

    I hope this helps other people out there.

    0 讨论(0)
  • 2020-12-03 19:02

    In my case, the folder where CSS hosted had different permission than page where CSS needed to be applied. I changed to same permission and worked.

    0 讨论(0)
  • 2020-12-03 19:17

    I was using Tomcat and JSP. I had to put : <%@page contentType="text/css" %> at the top of the CSS file and then tomcat serves it as a CSS mimetype.

    0 讨论(0)
  • 2020-12-03 19:19

    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)

    0 讨论(0)
提交回复
热议问题