Page 1 of 1

Buffer Bouncing

Posted: Sun Oct 26, 2003 4:00 pm
by Gen-ik
The new versions of PHPNUKE seem to render a HTML page in bits rather than dumping the whole page to the browser once everything has been done. A good example of this is at http://www.deviantart.com

I have a good idea about how this is done and was hoping to get your thoughts on it.


Each page is built up from a load of different modules which display things like the latest members, news, shout box items, and so on. Obviously the data for these modules is coming from a database.

I think this is working by calling ob_start() before a request to the database is made, echoing the results, and then calling ob_end_flush().... and this continues thoughout the page with each module giving a 'streaming' type effect to the whole thing.

However it works I think it is a good idea as it gives the user something to look at while the page is building itself.


Any ideas or thoughts on this?

Posted: Sun Oct 26, 2003 6:29 pm
by Cruzado_Mainfrm
i didn't notice that, i have DSL 128kbps downlading speed

Posted: Sun Oct 26, 2003 7:38 pm
by Gen-ik
Ok fair point... but in theory would this work? Currently I don't have a site with enough information on it to test it out.

Posted: Sun Oct 26, 2003 7:43 pm
by McGruff
Buffering isn't always necessary: a simple echo can "stream" content.

Posted: Sun Oct 26, 2003 8:07 pm
by JAM
Might want to look at flush() also...

Posted: Sun Oct 26, 2003 8:34 pm
by Gen-ik
Cheers JAM I think that's what I'm after.