• Register
0 votes
131 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

Please log in or register to answer this question.

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 332 views
332 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, 2020 jwilliam 3.9k points
0 votes
1 answer 142 views
142 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 67 views
67 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 193 views
193 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 379 views
379 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, 2020 alecxe 7.5k points
0 votes
1 answer 39 views
39 views
Problem hey, I want to that how to code to get a effect of image of showing full size when click on the image. provide me code of that and funtioning of that. i hope you will provide the best one.
asked Nov 13, 2020 chris jordan 2.2k points
0 votes
1 answer 10 views
10 views
Problem: Is there anyone who can tell me that what technology i need to learn additionally .Please help me so i can improve my skills . Help me understand all the modern variety of web development tools. I have been working for 22 years either as a front-end, or as a ... i.e. if they offer something else - I will be very glad to hear. And the question itself: in what order to study technology?
asked Nov 10, 2020 Han Li 710 points
0 votes
1 answer 20 views
20 views
I have a form input in HTML for a password. When user type passwordit is replaced by the (*) symbol. For e.g. if a user types a password as 9876 it will show as ****. Now I want to add a feature in the form that when users hovers on it the password show and the * symbol disappear. Does anyone know how to do this? Thanks in advance.
asked Oct 9, 2020 sikandar 2.4k points
0 votes
1 answer 14 views
14 views
How to validate the 10 digits mobile number and email id using jQuery in the registration form filled by the user at the time of registering on the site?
asked Oct 9, 2020 sikandar 2.4k points
0 votes
4 answers 27 views
27 views
I have written an HTML code which also contains CSS and JavaScript files. It's looking a bit complex seeing so many codes in one single file. How can I divide the HTML, CSS, JavaScript files so that it works similarly but the code is easy to understand and good by looks? Secondly, also tell how to jQuery within a JavaScript file?
asked Oct 9, 2020 sikandar 2.4k points