资源解释为脚本,但用MIME类型文本/普通文件传输本地文件

batzkoo提出了一个问题:Resource interpreted as Script but transferred with MIME type text/plain - for local file,或许与您遇到的问题类似。

回答者Simon Sarris给出了该问题的处理方式:

I figured it out!

The Visual Studio installer must have added an errant line to the registry.

open up regedit and take a look at this registry key:

See that key? The Content Type key? change its value from text/plain to text/javascript.

Finally chrome can breathe easy again.

I should note that neither Content Type nor PercievedType are there by default on Windows 7, so you could probably safely delete them both, but the minimum you need to do is that edit.

Anyway I hope this fixes it for you too!

希望本文对你有帮助,欢迎支持JavaScript中文网

原文链接:stackoverflow.com

上一篇:custom-guider
下一篇:为什么don't浏览器抛出一个错误,当任何其他的词是用来代替'JavaScript '在onclick的价值吗?

公众号

欢迎 JavaScript 爱好者