【发布时间】:2011-04-23 09:38:00
【问题描述】:
资源被解释为文档,但以 MIME 类型 text/css 传输
这是在 Google Chrome Inspector 中显示的错误。
文件是:http://www.doanddare.org/css/style.css
它正在由 php 处理器呈现。
我该如何解决这个错误?
返回的标题是:
请求标头
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
响应标头
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
可能与作为文档发送的请求标头和作为 css 文件返回的响应标头有关吗?
如果是这样,我应该如何控制请求头?
感谢您的帮助。
【问题讨论】:
标签: php css http-headers