chrome出现MIME type is not executable
错误信息:
because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
情景: 在一个页面动态引入github上的js文件。
问题原因:github动态加载js文件时返回content-type为text/plain,与文件类型.js不匹配,禁止加载。
问题解决:获取js文件转换成script标签可用的地址,如:“ https://raw.githubusercontent.com/* ”,然后取出第一个“.”变为:“
https://rawgithubusercontent.com/*”。
参考:https://code.google.com/p/chromium/issues/detail?id=180007