Resource interpreted as Stylesheet but transferred with MIME type application/x-css
2014-12-19 14:40
441 查看
用tornado做了一个简单的页面。结果页面中的css被加载了,但是没有效果。用谷歌浏览器调试,说是Resource interpreted as Stylesheet but transferred with MIME type application/x-css。大概意思就是css文件被识别为样式表了,但是传输的时候是以application/x-css格式。这样就造成浏览器不能正常显示页面,css完全不起作用。原因就是,tornadod中的web.py在设置content_type时会调用mimetypes.guess_type()
而mimetypes在初始化的时候,如果是windows环境下,就会读取本地的注册表。 因此只要把注册表中,css文件的Content Type由applicntion/x-css 改为text/css即可。
相关文章推荐
- odoo 错误 Resource interpreted as Stylesheet but transferred with MIME type application/x-css:
- Resource interpreted as Stylesheet but transferred with MIME type application/x-css
- 警告:Resource interpreted as Stylesheet but transferred with MIME type application/x-css
- Resource interpreted as Stylesheet but transferred with MIME type application/octet-stream
- 建站记录2-CSS文件未加载-已解决-Resource interpreted as Stylesheet but transferred with MIME type text/plain
- Resource interpreted as Stylesheet but transferred with MIME type text/html:以及Uncaught SyntaxError:
- web页面 显示 Resource interpreted as Stylesheet but transferred with MIME type text/plain的错误警告
- CSS引入错误Resource interpreted as Stylesheet but transferred with MIME
- Resource interpreted as Stylesheet but transferred with MIME type text/plain
- Java过滤器引发的异常:Resource interpreted as Stylesheet but transferred with MIME type text/html
- Resource interpreted as Stylesheet but transferred with MIME type text/plain
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- 关于easyui Resource interpreted as Document but transferred with MIME type application/json
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Font but transferred with MIME type application/x-font-woff
- Resource interpreted as Document but transferred with MIME type application/json ...
- 谷歌浏览器下在文本框中敲回车会下载。。。Resource interpreted as Document but transferred with MIME type application/json
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...