对于安装中的一个css文件,我会收到以下警告:
Resource interpreted as Image but transferred with MIME type text/css.
如何解决这个问题?我在rails 2.8.11上使用rails运行apache2。
服务器肯定发送了正确的内容类型:
Accept-Ranges:bytes
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:803
Content-Type:text/css
Date:Wed, 15 Jun 2011 04:20:45 GMT
ETag:"66941-921-49f967c2bd200"
Keep-Alive:timeout=15, max=96
Last-Modified:Tue, 29 Mar 2011 03:16:24 GMT
Server:Apache/2.2.12 (Ubuntu)
Vary:Accept-Encoding
但是,浏览器仍然声称“资源被解释为图像”。
发布于 2014-12-10 09:11:04
我也遇到了同样的问题,并通过修复我的一个CSS文件来解决它。我改变了密码:
body { background:url(''); }
适用于:
body { background-image:none; }
解释:因为url('')
指向自己,而且它是一个.css
文件,所以浏览器找不到它想要填充url
的图像。
https://stackoverflow.com/questions/6352993
复制相似问题