> 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

Reply via email to