Display progress in browser using flush(); IE versus NS
| From: | Spallek, Heiko | Date: | Fri, 26 Jan 2001 19:19:04 +0000 |
| Subject: | Display progress in browser using flush(); IE versus NS | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-36849@lists.php.net to get a copy of this message | ||
Hi,
I have a script which slowly processes several thousand lines of text. I
want to give users a feeling for that the process is not dead. Thus, I am
using:
...
print "processing ";
print"
";
flush();
for($i=0;$i<count($total);$i++) {
print".
";
flush();
// do something time consuming
}
...
Works perfect in IE 5.5: It shows the word "processing" followed every 2
seconds (denpending on what I am doing) by a new period.
But, in Netscape nothing shows up until the entire process has finished.
When I push "stop" on the Netspace menu it shows what was transfered so far
and "Transfer interrupted!" But, I would rather have it the way it is in IE.
Any idea how to improve the code above?
Thanks!
Der Heiko
Buchtipp: http://www.aufbruch.com/
Heiko und Gisela Spallek:
Aufbruch ins Land der unbegrenzten Moeglichkeiten.
Studieren, Arbeiten und Leben in den USA: Tips fuer Neuankoemmlinge
2. erweiterte und ueberarbeitete Auflage: ISBN: 3-934407-01-3