I guess a better question would be, what is the "best practices" way of showing a "Please wait..." page while a server operation is performed (which could take 5 or 45 seconds), then make the page display the resulting data (via reload, or slow-load, or whatever)? Would love to find an article on this.

...Rene

On Wednesday, June 9, 2004, at 05:56 PM, Michal Migurski wrote:

When Expedia.com is searching for flights, it displays a page with a
little animated GIF progress bar, then display the results.

How do they do that? How does the page sit idle until the query is
finished, and then sends a new page with the results? I was thinking
that they might use HTTP-REFRESH or something, and just keep hitting the
database until the result is there. But is there a "best way" to do
this? In my application, when the user clicks a certain button, it will
take 10-20 seconds for the operation to complete—during that time I need
the web browser to "waiit" for the data.

The progress bar goes by too quickly for me to tell, but perhaps they are
using a slow-loading resource someplace on the page? E.g., an image whose
content-length is 64, whose 64th byte does not get sent by the server
until the query is complete. Combine that with a bit of javascript waiting
for the image to load, and you should have basic loading-bar behavior.


---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to