Re: Python CGI and Browser timeout
- From: Steve Holden <steve@xxxxxxxxxxxxx>
- Date: Sat, 28 Apr 2007 10:32:03 -0400
Sebastian Bassi wrote:
On 26 Apr 2007 14:48:29 -0700, skulka3@xxxxxxxxx <skulka3@xxxxxxxxx> wrote:In order to work around this problem, I started printing empty strings
(i.e. print "") so that the browser does not timeout.
How do you print something while doing the query and waiting for the results?
I saw some pages that display something like: "This page will be
updated in X seconds to show the results" (X is an estimated time
depending of server load), after a JS countdown, it refresh itself and
show the result or another "This page will be updated in X seconds to
show the results".
The usual way is by "client pull": send the content you want the user to see, and include a Refresh: header - the easiest way is to include a META tag in the html content <head> section like
<meta http-equiv="refresh" content="N; URL=other-web-address">
So the page can continually check whether the user's job is finished, if it isn't just sending out the same content and then when it is printing the details.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get Python in your .sig and on the web. Blog and lens
holdenweb.blogspot.com squidoo.com/pythonology
tag items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
.
- References:
- Python CGI and Browser timeout
- From: skulka3
- Python CGI and Browser timeout
- Prev by Date: Re: Multiple select in wx.GenericDirCrtl
- Next by Date: Re: Program runs in all directories, except one..
- Previous by thread: Re: Python CGI and Browser timeout
- Next by thread: Re: Python CGI and Browser timeout
- Index(es):
Relevant Pages
|