resource interpreted as stylesheet but transferred with mime type text plain issue?

孤人 提交于 2019-12-31 03:16:07

问题


I am working in Apache 2.2. My localhost opened my web page, but there is no CSS applied and background images were not loaded. I don't know why. Using the Chrome developers tool I got the following warnings:

resource interpreted as stylesheet but transferred with mime type text plain 
resource interpreted as stylesheet but transferred with mime type text html
resource interpreted as script but transferred with mime type text html
GET http://www.xmweb.com/js/calendar/layout-3d.css 404 (Not Found)
resource interpreted as Image but transferred with mime type text html

I do not understand this issue. Is it a problem in the httpd.conf file? I tried to add a .htaccess file, but still I got the same issue. Please help!


回答1:


If seems that your browser cannot load the CSS, and you are getting a 404 (Not found) and a HTML page with a 404 message. Try to load http://www.xmweb.com/js/calendar/layout-3d.css directly via your browser and look at the page.

It may help to open up the error log of your webserver to see whats missing.




回答2:


I had a similar problem with a stylesheet, and I solved it by adding this line to the .htaccess file:

AddType text/css .css

I would try this and also make corresponding entries for javascript and images.



来源:https://stackoverflow.com/questions/7347102/resource-interpreted-as-stylesheet-but-transferred-with-mime-type-text-plain-iss

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!