• Register
0 votes
80 views

Problem :

I have the javascript application and when I try to run it on firefox I am facing the below error on the console:

“Because its mime type ('text/html') is not a supported stylesheet mime type”         

Now I am completely confused because of this error. Kindly somebody let me know how can I resolve my above error?

7 5 2
3,870 points

1 Answer

0 votes

Solution :

In your head section of the html document

<link rel="stylesheet" type="text/css" href="/path/to/ABCD.css">

Your css file should be the css file only and it should not contain any markup.

OR

This is more likely the issue at the server side. The request style sheet page "Styles/Site.css" from your server of type "text/css", but the server might be responding to this request with the "test/html". I had this same issue when my server was running in the python and it was replying to the requested css files with header text/html (as that of my index.html file). So I re-arranged my server code and assigned a correct headers to its corresponding pages and the issue got resolved.

OR

Review your .htaccess. Maybe, your .htaccess rule is interfering with your right output. So just try to browse your CSS resource directly in the address bar, it must be presented in a text format.

9 7 4
38,600 points

Related questions

0 votes
2 answers 243 views
243 views
Problem : I have below problem. Chrome continues to return below error &ldquo;Resource interpreted as stylesheet but transferred with MIME type text/html&rdquo; My files affected by above error are just a Style, chosen and jquery-gentleselect (other CSS files that are imported in a ... without error). I have already checked the MIME type and text/css is already on a CSS. How to resolve my error?
asked Jan 22 jwilliam 3.9k points
0 votes
1 answer 111 views
111 views
Problem : Encountered mime type error and looking for its solution because its mime type ('text/html') is not executable, and strict mime type checking is enabled.
asked Nov 11, 2019 peterlaw 6.9k points
1 vote
1 answer 57 views
57 views
Problem : I am getting mime type error because its mime type ('text/plain') is not executable, and strict mime type checking is enabled.
asked Nov 11, 2019 peterlaw 6.9k points
0 votes
1 answer 116 views
116 views
Problem : I am trying to use the reactrouter but i am getting following error because its mime type ('text/html') is not executable, and strict mime type checking is enabled
asked Nov 13, 2019 peterlaw 6.9k points
0 votes
1 answer 236 views
236 views
Problem : I am unable to solve my link problem. Can anybody help on to this to link the CSS and JS File? I am facing below error : Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/ ... .js Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/prettify.js
asked Jan 10 alecxe 7.5k points