[Solved] How to preload a web page using external preloader?


You can cause the browser to cache the image by loading it on index.html as a 1 pixel image

<img src="https://stackoverflow.com/index2-background-image.jpg" alt="" width="1" height="1" />

Alternatively you could load the content from index2.html using jQuery like so:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
jQuery().ready(function () {
    $.get('index2.html', function(data) {
        jQuery("#index2content").html(data);
    });
});
</script>

<div id="index2content"></div>

2

solved How to preload a web page using external preloader?