Chrome 报 Resource interpreted as Script but transferred with MIME type text/plain 警告的解决办法

安装了VS2012之后,chrome在加载页面的时候会报 Resource interpreted as Script but transferred with MIME type text/plain 的警告。

这是因为VS2012在安装的时候改了windows的注册表,将解析javascript的类型标示改成了text/plain,导致javascript被转换成了text/plain格式,但这并不影响javascript的运行。

解决方法如下:

1.WIN+R 打开运行框,输入“regedit”进入注册表。

Chrome 报 Resource interpreted as Script but transferred with MIME type text/plain 警告的解决办法_第1张图片

2.在“计算机/HKEY_CLASSES_ROOT/.js”目录下找到Content Type键,将其值改为“text/javascript"。或则,可以将倒数两个键删除,因为在安装vs2012之前,这两个键是不存在的,当卸载vs2012之后也是一样。

Chrome 报 Resource interpreted as Script but transferred with MIME type text/plain 警告的解决办法_第2张图片


刷新页面之后就不会再报上文的警告了。


你可能感兴趣的:(windows,浏览器,脚本,前端开发,注册表)