Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resource interpreted as document but transferred with MIME type text/css

Resource interpreted as document but transferred with MIME type text/css

This is the error that's showing up in Google Chrome Inspector.

The file is: http://www.doanddare.org/css/style.css

It is being rendered by a php processor.

How can I fix this error?

The headers being returned are:

Request Headers

Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Cache-Control:max-age=0 User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3 

Response Headers

HTTP/1.1 200 OK Date: Sun, 10 Oct 2010 07:35:04 GMT Server: Apache content-style-type: text/css Expires: Thu, 10 Oct 2030 03:50:23 GMT Cache-Control: max-age=631138519, public Content-Encoding: gzip Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/css Connection: Keep-Alive 

Could it be something to do with the request headers being sent as a document and the response headers returned as a css file?

If so, how should I control the request headers?

Thanks for any help.

like image 713
Emmanuel Avatar asked Oct 10 '10 07:10

Emmanuel


1 Answers

I only get error that when I view the specific resource on Chrome. This also happens when I try to open a Javascript file (.js).

My conclusion is that when you open a component file (.css, .js) in Chrome, it will try to interpret as document (showing output on the screen), instead of interpreting it as its native MIME type.

Say a Javascript file. If you enter it in Chrome, it should be interpreted as document (showing output on the screen), instead of Chrome executing the script (that's what its native MIME type does).

That message is Google Chrome only and is negligible, as it only appear when you open a component file.

like image 129
mauris Avatar answered Oct 19 '22 21:10

mauris