Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refused to apply style from... because its MIME type ('text/html') is not a supported style-sheet MIME type, and strict MIME checking is enabled

This error shows only in chrome. I am searching this issue but not yet found any
satisfactory solution.I attached a screenshot of that error. Please suggest some idea for this. Error image

like image 853
praval Avatar asked Feb 21 '18 11:02

praval


2 Answers

Stylesheets should have a MIME type of text/css. Your server is serving up a HTML document (probably a 404 NOT FOUND error page) when it should be serving a CSS document.

like image 126
Alohci Avatar answered Sep 17 '22 12:09

Alohci


Solution:
In my case, the problem was an empty @GetMapping in one of my Controllers. I deleted it and the problem was gone.

I think the same answer will help someone who's having this similar problem and context ; e.g. JSP.

Background:
I had the same problem using Spring Boot and FreeMaker.

like image 45
Fox2k Avatar answered Sep 18 '22 12:09

Fox2k