Unless one of your requirements is to support clients with javascript disabled, your best bet is not to tie up the connection while your server is doing some busy calculations.
There are many javascript libraries out there that provide ajax progress bar component.
Basically the browser send all the relevant inforamtion to the server via an async ajax call, and the server will return a token or id. If you are using one of those progress bar components, it should handle the polling and UI updates. All you need to do is provide an ajax handler to send the job progress (0-100%, or error status) in XML/JSON, etc.
HTH, -- Mac
On 3/9/07, Lars Rune Nøstdal larsnostdal@gmail.com wrote:
On 3/9/07, Andrei Stebakov lispercat@gmail.com wrote:
I'd like to know if there is some functionality in hunchentoot that would allow me to show the progress page to the user. Let's say a user click on a link handle by hunchentoot hander method which takes a lot of time to process. How can I show a page that says "Please, wait" which will redirect to the actual data view of the handler? Here I can think of only "<meta http-equiv='refresh' content='0;" but maybe there is something supported by the framework? Sorry if my question is not totally related to hunchentoot.
You could maybe set up a chunked response for the "please wait"-page and somehow make an event trigger when it is completely loaded (when the server side stuff is done). Using javascript with an `onload' might work.
http://www.w3schools.com/jsref/jsref_onload.asp
(i'm new to the list btw. .. hope this ends up in the right location/thread)
-- Mvh, Lars Rune Nøstdal http://nostdal.org/
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel