Re: Python CGI and Browser timeout



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 ----------------

.



Relevant Pages

  • Re: Is threading the right solution for this challenge?
    ... A typical screen "refresh" could take up to 10-15 ... the display thread (since it is only inquiring there is no danger ... interrupt itself to check for user input and react to it. ... In ACCEPT with TIMEOUT, what happens if the user was in the process of ...
    (comp.lang.cobol)
  • Re: HTA - Refresh
    ... as part of the browser Document Object Model. ... point you want the display to be updated. ... Dim nPause ... he's wrong about the Refresh. ...
    (microsoft.public.scripting.vbscript)
  • Re: Python CGI and Browser timeout
    ... so that the browser does not timeout. ... I saw some pages that display something like: ... Club de la razón ...
    (comp.lang.python)
  • Does browser cache images?
    ... server, my browser will display old image until I refresh. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Session TimeOut
    ... is it possible that as soon as my session gets a timeout, ... I display my page in 2 modes: view and edit. ... And when I'm in edit and I get a time-out, I need to refresh the page ...
    (microsoft.public.dotnet.framework.aspnet)