Forum Moderators: open

Message Too Old, No Replies

page loading

presenting page at once

         

chimchim

3:30 am on Apr 16, 2002 (gmt 0)



what is the method for not having the page display until all of the material is presented by the server?

tedster

4:59 am on Apr 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is dependent on the browser, as far as I am aware, and each one has its own peculiarities.

If everything is wrapped inside one big <div> or <table>, then rendering is often delayed until everything is ready - but you can't depend on it.

joshie76

6:27 pm on Apr 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could script such behaviour by changing the visibility of your body tag on the onload event:

eg.

<body style="visibility:hidden" onload="this.style.visibility='visible'">

Though if someone had JavaScript turned off they'd just never see your page! So I'd advise against this in all but the most desperate of circumstances. I've had to do something similar once as a bug fix* for IE4 - though that was for an application where scripting was an absolute requirement anyway.

*for those interested the bug was: We had a dropdown and if someone changed a selected option a form would be posted to refresh the page. If they did this before the whole page had loaded up, the frame would entirely dissappear! If I viewed the source in the space where it was I'd see the frameset source!!! To prevent this I hid the whole page until it loaded. Weird eh? ;)

toadhall

7:28 pm on Apr 16, 2002 (gmt 0)

10+ Year Member



You could use Output Control [php.net] with php (must be an equivalent in perl) to buffer the output till ready.

avyworld

8:59 pm on Apr 16, 2002 (gmt 0)

10+ Year Member



window.offscreenBufferring=false;

That makes sure that the entire page is put into a buffer and displayed all at once. Note: IE5+.

Hope that helps!

Happy coding! :)

buckworks

9:09 pm on Apr 16, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Be sure to consider how this will affect your user's experience. A page that has an all-or-nothing loading sequence needs to be VERY fast or else you'll start losing visitors because they will think nothing is happening / something's not working right.

Before you make your final design decisions, I'd suggest doing some careful testing to compare how visitors respond to an all-or-nothing loading sequence compared to letting the browser display things as they come in.