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

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


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!


I tried fixing this problem using this method but it didn't work for me.

My problem was that IIS manager didn't have MIME types in HTTP Features.

I was able to turn it on by enabling Static Context via...

--> Control Panel

--> Programs

--> Turn Windows features on or off

--> Internet Information Services

--> World Wide Web Services

--> Common HTTP features

--> [X] Static Content.

After this, MIME types appeared and everything started working again.


The accepted answer is a great one! However, just to post an answer for those who encounter problem like me, who use a department/college computer sometimes, where I do not have the permission to change any key value in regedit.

Change

<script type="text/javascript" src="main.js"></script>

to

<script src="main.js"></script>

Although the error message still exist, the page loaded correctly.