Resource interpreted as Script but transferred with MIME type text/plain - for local file

前端 未结 3 1742
梦毁少年i
梦毁少年i 2020-11-30 18:42

I\'m getting a \"Resource interpreted as Script but transferred with MIME type text/plain\" warning in Google Chrome when including a local script file.

I know the p

3条回答
  •  温柔的废话
    2020-11-30 19:32

    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:

    enter image description here

    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!

提交回复
热议问题