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

后端 未结 5 1489
忘掉有多难
忘掉有多难 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条回答
  •  旧巷少年郎
    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.

提交回复
热议问题