ERROR: “Content-Type“ HTTP “image/png” is not supported
<p>I am developing a simple html5 game. I use this set of functions as first calls on page load to check if all my media content (a .png and a .mp3 so far...) is properly loaded before initializing the game itself: </p>

<pre><code>//initialize and keep count of how many media elements get successfully loaded....  
    function initMedia(pics, audio)
    {            
        game.requiredImages = pics.length;
        game.requiredFX = audio.length;

        for(i in pics)
        {
            var img = new Image();
            img.src = pics[i];
            game.images[i] = img;

            game.images[i].onload = function(){
                game.loadedImages++;
            };
        } 

        for(ii in audio)
        {
            var fx = new Audio();
            fx.src = pics[ii];
            game.audio[ii] = fx;

            game.audio[ii].onload = function(){
                game.loadedFX++;
            };
        }         
    }

    //check how many media files are loaded against the expected amount
    function checkMediaLoading()
    {
        if(game.loadedImages &gt;= game.requiredImages &amp;&amp; game.loadedFX &gt;= game.requiredFX)
            //if all the media elements are there this function triggers the rest of the code
            pullAndPrepareText(gametext);
        else
        {
            setTimeout(function(){
                checkMediaLoading(); //...if not check again... 
            }, 100);
        }            
    }

    //pass two arrays with the paths to the images and audio files
    initMedia(["imgs/ship_001.png"],["audio/thrust.mp3"]);        
    //start checking the media loading status
    checkMediaLoading(); 
</code></pre>

<p>But I get an error thrown (FF):
<strong>“Content-Type“ HTTP “image/png” is not supported.</strong></p>

<p>The problem is that this occurred only after I added the audio file checking to the system. Before it was only the image path passed to the function, hence only one loop and one condition to trigger the last function.
After adding the audio I got the error thrown <em>but just ABOUT THE PNG FILE</em>...</p>

<p>Can someone please point onto the right direction to fix this?</p>

<p>Thanks you...!</p>