Skip to main content

Debug message "Resource interpreted as other but transferred with MIME type application/javascript'


OK, I understand what the messages means , but I'm really not sure what's causing it. I'm using Safari and the Web Inspector on Mac OS X, by the way.



I've got the following in my document head:




<script src="http://local.url/a/js/jquery.js" type="text/javascript"></script>
<script src="http://local.url/a/js/jquery.inplace.js" type="text/javascript"></script>



jquery.js is handled fine, but the other file causes the warning. It also seems that the javascript in this file never gets executed.



The file is being served via mod_deflate , so it is gzip encoded, but so is the other file.



Has anybody got any ideas what's causing this, or how to resolve it?



Cheers all, Gaz.


Source: Tips4allCCNA FINAL EXAM

Comments

  1. seems to be a bug in safari / webkit. maybe this one, or any of these. try upgrading your safari. if there is no more recent stable version, try the 4 beta.

    ReplyDelete
  2. An image with an empty "src" attribute generates this error under Windows-Chrome:

    <img src="">


    ... whereas ...

    <img>


    ... does not.

    I arrived here because my ajax resultset was returning "src" data which was empty yet the img was still being inserted into the page.

    ReplyDelete
  3. I don't thing is a bug,
    try adding the mime type to your .htaccess file
    for example put or add the following content to your .htaccess file (which should be in the same place of your .js or above folders)

    #JavaScript
    AddType application/x-javascript .js


    This solved my tree "Resource interpreted as other but transfered ... " Warnings.
    Everytime you have that kind of warning it means you don't have enough info in your .htaccess file.

    BTW1: Since you are modifying .htaccess file, make sure you restart your server.

    BTW2: I also could clear same warnings for GIF files in Safari 4 with this:

    #GIF
    AddType image/gif .gif


    BTW3: For other file types: see w3schools list or htaccess-guide

    Regards

    Ignacio

    ReplyDelete
  4. This warning appears because no default script type is specified. Try adding the following directive to your HTML file:

    <meta http-equiv="content-script-type" content="text/javascript">

    You can read more about default scripting specifications here:
    http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.2.2.1

    ReplyDelete
  5. Solved!

    I have had this error for several days. It was driving me crazy because it didnt allow me to use firefox firebug's script debugger. Finally, my error was solved when I removed an empty url in a "background-image: url()" style property.

    This has been so much a pain than I really hope somebody can use this advice.

    ReplyDelete
  6. You need to use a tool to view the HTTP headers sent with the file, something like LiveHTTPHeaders or HTTPFox are what I use. If the files are sent from the webserver without a MIME type, or with a default MIME type like text/plain, that might be what this error is about.

    ReplyDelete
  7. It is because of the period in the file name. It is stupid, but anytime there is a period in the js file name you will get this error, and I have come across situations where it will actually prevent the js file from loading.

    ReplyDelete
  8. It seems like a bug in Safari's cache handling policies.

    Workaround in apache:

    Header unset ETag
    Header unset Last-Modified

    ReplyDelete
  9. I just got this and solved it locally on my mac. For some reason the javascript file in question had bad permissions. I noticed when I looked at it in firebug I was getting a 403. I hope that helps anyone.

    ReplyDelete
  10. I had the same issue with a css file instead of javascript. (using the xitami webserver)

    what fixed for me was adding under the MIME section of xitami.cfg:

    css=text/css

    ReplyDelete
  11. I found out that the naming of my css files was in conflict with the proxy filters

    www.dating.com (which is not my site) was blocked and my css and js files were called dating.css and dating.js. The filter was blocking this. Maybe that is the case with some of you, working on corporates systems.

    ReplyDelete
  12. This bug seem to have resurfaced (Noticed it November 2010)

    I think the WebKit bug reports involved are this one and this. Essentially it boils down to incorrect cache handling when doing an If-Modified-Since which get a 304 response.

    ReplyDelete
  13. Another common cause of this error on the Mac is Apple's quarantine flag.

    ls the directory containing the resource(s) in question. If you see the extended attribute indicator, i.e., the little @ symbol at the end of the permissions block (e.g. -rw-r--r--@ ) then the file could be quarantined.

    Try ls -la@e and look for com.apple.quarantine

    The following command will remove the quarantine:

    xattr -d com.apple.quarantine /path/to/file

    ReplyDelete
  14. There seem to be many things that cause this. For me it was a lowercase rewrite rule in IIS. Changed the problem files (js and png) to lowercase and problem went away.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

Java Urban Myths

Along the line of C++ Urban Myths and Perl Myths : What are the Java Urban Myths? That is, the ideas and conceptions about Java that are common but have no actual roots in reality . As a Java programmer, what ideas held by your fellow Java programmers have you had to disprove so often that you've come to believe they all learned at the feet of the same drunk old story-teller? Ideally, you would express these myths in a single sentence, and include an explanation of why they are false.

CCNA 1 Final Exam 2011 latest (hot hot hot)

  Hi! I have been posted content of ccna1 final exam (latest and only question.) I will post the answer and insert image on sunday. If you care, please subscribe your email an become a first person have full test content. Subcribe now  Some question  have not content because this question have images content. So that can you wait for me? SUNDAY 1. A user sees the command prompt: Router(config-if)# . What task can be performed at this mode? Reload the device. Perform basic tests. Configure individual interfaces. Configure individual terminal lines. 2. Refer to the exhibit. Host A attempts to establish a TCP/IP session with host C. During this attempt, a frame was captured with the source MAC address 0050.7320.D632 and the destination MAC address 0030.8517.44C4. The packet inside the captured frame has an IP source address 192.168.7.5, and the destination IP address is 192.168.219.24. At which point in the network was this packet captured? leaving host A leaving ATL leaving...