Progressive page updates
Now this is cool: The joy of flush() shows how PHP’s
flush() function can be used to send data to the browser before a page has finished rendering. Check out Ben’s demo page to see the trick in action.
<script> element with a call to the progress incrementing function whenever an operation in the server side code has been completed. I’ve seen it used for IRC style chat applications as well, but I’ve always been concerned about the server resources that must be tied up in serving multiple persistent connections at once.