[mod_python] Re: sending headers directly to the client

Mike Looijmans nlv11281 at natlab.research.philips.com
Mon May 15 02:46:50 EDT 2006

When the user submits the request, immediately return a page that says 
something like "processing your request, please wait...".

The simplest thing to do is to just output that on the result page, and 
flush() the request output. Then do as you normally do.

The "please wait" could be removed with javascript or so.

Another option is to first return a "please wait" HTML page. This page 
has a redirect header, that loads the actual result page. The user gets 
to see the redirecting page until the result page is done.

Mike Looijmans
Philips Natlab / Topic Automation

Stefan Wehr wrote:
> Hi!
> Mike Looijmans <nlv11281 at natlab.research.philips.com> wrote::
>>First explain what is so special about your request that you cannot just 
>>send out regular data and have to delay sending the response headers?
> Answering some of our requests can take up to 30 seconds. We often
> have the problem that users are getting nervous, hit the 'Cancel'
> button of their browser, and reload the page. Now our system tries to
> answer two requests, which can lead to strange results: The database
> transaction started by the first request wins over the database
> transaction started by the second request, although the user
> explicitly stopped the first request.
>>Awaiting your reply - could a simple (periodic) redirect solve your problem?
> How what such a redirect work?
> Stefan
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list