Will the following result in two HTTP requests?
<pre><code>var img = new Image();
$(img).attr('src', "&lt;?php echo $image_url; ?&gt;");

$(window).load(function(e){
    resetImageSize(img);
    td.css('background-image', 'url("&lt;?php echo $image_url; ?&gt;")');
});

$(window).resize(function(e){
    resetImageSize(img);
});

function resetImageSize(img){
    var wr = $("#wrapper");
    var td = $("#wrapper td");

    if(img.width &gt; wr.width() || img.height &gt; wr.height()){
        td.css('background-size', 'contain');
    } else {
        td.css('background-size', img.width);
    }
}
</code></pre>

<p>How can I know?</p>
