Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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/plain.

I have checked all the script tags and they all have the MIME type="text/javascript". It even says so with jquery and jquery ui. What is wrong with Chrome?

What's the problem and the fix for this? Is it something I have to change in the 'options' of the browser or is it from the server, or do I have to tweak my code?

like image 494
Shaoz Avatar asked Aug 12 '10 12:08

Shaoz


1 Answers

It means that the server is sending a Javascript HTTP response with

Content-Type: text/plain 

You need to configure the server to send a JavaScript response with

Content-Type: application/javascript 
like image 135
SLaks Avatar answered Sep 20 '22 15:09

SLaks