Edward Tanguay Edward Tanguay - 1 year ago 91
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.

Answer Source

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"> 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download