Debug message “Resource interpreted as other but transferred with MIME type application/javascript”

前端 未结 15 2056
旧巷少年郎
旧巷少年郎 2020-11-29 01:50

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\'v

15条回答
  •  天命终不由人
    2020-11-29 02:09

    I don't think it is a bug, Try adding the MIME type to your .htaccess file For instance, 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

提交回复
热议问题