Resource interpreted as Script but transferred with MIME type text/plain:
生活随笔
收集整理的這篇文章主要介紹了
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")'; ?>
總結
以上是生活随笔為你收集整理的Resource interpreted as Script but transferred with MIME type text/plain:的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SQL SERVER提供了大量的WIND
- 下一篇: 郑州银行上市时间