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
If you're generating your javascript with a php file, add this as the beginning of your file:
<?php Header("Content-Type: application/x-javascript; charset=UTF-8"); ?>
I had this problem while using a web framework and fixed it by moving the relevant javascript files into the designated (by the framework) javascript folder.
I had this problem and I figured out how to fix it.
It happens when the style (CSS) file is in a different encoding from the PHP file that references the .css file
For example, using jQuery.js in Unix encoding and using index.php in UTF-8 will cause this problem so you have to make them both UTF-8 or any other encoding as long as it the same.
In your apache's httpd.conf, just add such a line:
AddType application/x-javascript .js
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
I received this debug message for a sillier reason than the other answers here: This is the error message received when you don't get enough sleep and reference a js file by using the syntax for a css file. As in,
<link rel='stylesheet' type='text/css' href='clearly_javascript.js'/>
rather than
<script src='clearly_javascript.js'></script>
Thought I'd put this up here because this is the first post that comes up when searching for the error message.