Edward Tanguay Edward Tanguay - 3 months ago 12
PHP Question

How can I make sure a background image displays before the page loads?

Is there a way to make sure a (large, 300K) background picture is always displayed first BEFORE any other content is shown on the page?

On the server we have access to PHP.


All the html content is served and parsed before it even starts to fetch the image, so you have a problem before you start.

You could circumvent this by programmatically hiding the content, and then triggering a "show" of it when the image is loaded.


    <image here/>
    <div id="content" style="display:none;" >

    <script type="psudocode">