Javascript – Resource interpreted as other but transferred with MIME type text/javascript

javascriptmeta-tagsmime-types

I keep getting "Resource interpreted as other but transferred with MIME type text/javascript.", but everything seems to be working fine. This only seems to be happening in Safari 4 on my Mac.

I was advised to add "meta http-equiv="content-script-type" content="text/javascript" to the header, although that did nothing.

Best Answer

The most common way to get the error is with the following code:

<img src="" class="blah" />

A blank url is a shortcut for the current page url, so a duplicate request is made which returns content type html. The browser is expecting an image, but instead gets html.