Chrome says “Resource interpreted as script but transferred with MIME type text/plain.”, what gives?

后端 未结 20 2609
眼角桃花
眼角桃花 2020-11-22 07:21

In FF and all, my javascript works fine. But in Chrome it gives this message:

Resource interpreted as script but transferred with MIME type text/plai

20条回答
  •  旧巷少年郎
    2020-11-22 08:18

    The answer posted here by simon-sarris helped me.

    This helped me solve my issue.

    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!

    Don't forget to restart your system after the changes.

提交回复
热议问题