Resource interpreted as Script but transferred with MIME type text/plain:

简介:

我用script做ajax跨域,请求返回的是个文本字符串,chrome提示:
Resource interpreted as Script but transferred with MIME type text/html.

(请求的是script文件,返回的却是个文本格式)

貌视chrome浏览器比较认这个格式~,去掉<!DOCTYPE html>就行了。

 

其他影响,有待观察

仅供参考

--------

来自前线最新的消息:

经查是chrome、ff对js里的obj.style.width赋值的宽度要带px ; 去掉<!DOCTYPE html>后chrome、ff会通融一些~

正如楼下大哥所说,那个提示只是个waring~并非error~

--------

附:

常见MIME类型设置方法:

http://apps.hi.baidu.com/share/detail/33987094

PHP里设置MIME:

<?php header('Content-type: application/x-javascript'); ?>

<?php echo 'jumUrl("http://t.qq.com/duxing")'; ?>

分类:  ASP.NET, JAVASCRIPT

本文转自左正博客园博客,原文链接:http://www.cnblogs.com/soundcode/p/4624614.html ,如需转载请自行联系原作者
相关文章
|
XML JSON 人工智能
Error while extracting response for type [class xxx] and content type application/xml;charset=UTF-8
Error while extracting response for type [class xxx] and content type application/xml;charset=UTF-8
1363 0
|
6月前
|
JSON 数据格式
Content type ‘text/plain;charset=UTF-8‘ not supported,这里要把测试文件转为json格式
Content type ‘text/plain;charset=UTF-8‘ not supported,这里要把测试文件转为json格式
|
7月前
|
XML 数据格式
Xml declaration should precede all document content
Xml declaration should precede all document content
|
8月前
|
JSON Java 数据格式
Could not extract response: no suitable HttpMessageConverter found for ..content type [text/html...]
Could not extract response: no suitable HttpMessageConverter found for ..content type [text/html...]
796 0
head 插件 Content-Type header [application/x-www-form-urlencoded] is not supported
head 插件 Content-Type header [application/x-www-form-urlencoded] is not supported
143 1
|
8月前
|
Web App开发 移动开发 HTML5
HTML中input标签的23种type类型
HTML中input标签的23种type类型
|
JSON 数据格式
Content type ‘multipart/form-data;boundary=------57031299820747271;charset=UTF-8‘ not supported的解决方案
Content type ‘multipart/form-data;boundary=------57031299820747271;charset=UTF-8‘ not supported的解决方案
339 0
|
Scala
TYPE
TYPE
151 0
|
XML JSON 前端开发
Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
讲述ajax请求后端传参报 Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported问题处理
 Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
|
JSON JavaScript API
axios设置content-type
axios设置content-type
1003 0

热门文章

最新文章