Re: Expedia.com

From: Date: Wed, 09 Jun 2004 23:56:10 +0000
Subject: Re: Expedia.com
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-188002@lists.php.net to get a copy of this message
> 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

« previous php.general (#188002) next »