In a webapp, I am using yepnope.js
as a loader (mostly because of its ability to load CSS as well as JS).
However, for whatever gets loaded by yepnope, Chrome is giving the warning:
Resource interpreted as Image but transferred with MIME type text/javascript:
<some js file>
or
Resource interpreted as Image but transferred with MIME type text/css:
<some css file>
This is not creating any problems as far as execution is concerned, but what I don't understand is how is Chrome interpreting a pure JS or CSS file as an IMAGE.
And how to workaround this?
Also, whatever gets loaded from outside of YepNope, is loading perfectly without any warnings.
PS :: I don't have any extensions enabled. The only one enabled is PageSpeed.
Sit back and relax, it's just a warning.
yepnope uses <img>
to pre-load resources. That's why there is a warning.
Read preloadFile()
in yepnope.js.
This is answered by the yepnope team here: https://github.com/SlexAxton/yepnope.js/issues/32
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With