Do not load images in javascript
<p>I build a website and i want to ask the user when each time visit the site, if he want to display images or not. and if not, i want to do not load them and display the page without any img tag</p>

<p>i tried this, but this is not useful because the page will be loaded</p>

<pre><code>function load_img () {
if (!confirm("Do you want to load the images on your site?")) {
    var images = document.getElementsByTagName("img");
    var l = images.length;
    for (var i=0; i&lt;l; i++) {
        images[0].parentNode.removeChild(images[0]);
    }
}
}
</code></pre>

<p>i need some code that don't load any img tag when the page load,
and not a code that hide or remove the images after the page is loaded and the images are displayed</p>

<p>can someone help me please with this javascript code</p>

<p>thank you</p>
