Re: Dynamic HTML from Python Script



On Jun 11, 10:43 pm, Dennis Lee Bieber <wlfr...@xxxxxxxxxxxxx> wrote:
Those are not /server side/ refreshes...

Correct. But we weren't discussing server side refreshes. We were
discussing how to make the "browser refresh automatically in the
server side":

On Jun 11, 7:59 am, Lie <Lie.1...@xxxxxxxxx> wrote:
Surely you don't think you can do that without Javascript don't you?
You can't make the browser refresh automatically in the server side,
it has to be done in the client side scripting or like Opera browser
that have an option to make it refresh a page every few seconds.

The example I posted showed a simple way to "make the browser refresh
automatically in the server side" by using an HTTP Refresh header
instead of using any Javascript or client side scripting or setting a
browser option to refresh the page every few seconds.


On Jun 11, 10:43 pm, Dennis Lee Bieber <wlfr...@xxxxxxxxxxxxx> wrote:
On Wed, 11 Jun 2008 07:36:59 -0700 (PDT), Dave Parker
<davepar...@xxxxxxxxxxxxxxxxxx> declaimed the following in
comp.lang.python:

Yes you can.  I don't know how to do it in Python, but here's an
example in Flaming Thunder of a small, fast, light compiled server
side CGI that delivers dynamic content every 10 seconds.

  # Write out the HTTP headers, followed by a blank line.
  # Make sure to write CRLF and not just LF, as per HTTP
  # specs.  Also, turn off caching using the no-cache and
  # expires options, so that caching doesn't conflict with
  # refreshes.

  Set CRLF to CarriageReturn+LineFeed.
  Write "Refresh: 10; url=http://www.flamingthunder.com/cgi/
refresh.cgi",CRLF.

        Those are not /server side/ refreshes... The first thing being
written is a command to the browser that tells the browser to reload the
specified page after a delay period.

        IOWs it is the browser doing the refresh -- which means it starts a
whole new connection, receiving a page from the CGI script... Said page
again having a browser command to do a delayed refresh.

        Server side would mean that the server somehow continuously sends
updates WITHOUT BEING ASKED.
--
        Wulfraed        Dennis Lee Bieber               KD6MOG
        wlfr...@xxxxxxxxxxxxx              wulfr...@xxxxxxxxxxxxx
                HTTP://wlfraed.home.netcom.com/
        (Bestiaria Support Staff:               web-a...@xxxxxxxxxxxxx)
                HTTP://www.bestiaria.com/

.



Relevant Pages

  • Re: Force a page refresh
    ... Without some definite action from the browser on a client machine No. ... You can't "push" a web page from a server, it has to be "pulled" by a browser http request. ... when the page is visited but the viewer / client still has to either open or "refresh" the page. ...
    (microsoft.public.frontpage.client)
  • Re: How do I update an image without manual refresh?
    ... The browser will think it is a different image and will get it from the ... It doesn't have to be in javascript. ... If you do it on server side, ... How can I get an asp:Image to refresh when a user uploads a different ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Code to "click" a button -- is this possible?
    ... are you telling me there is no way that i can then refresh a specific frame ... AFTER the server side code is run? ... look at is that the web server simply makes a suggestion to the browser. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Updating Web Form Control From Thread
    ... >updating the textBox) refresh the page when waitForReply returns. ... The thread calling the web service is executing on the server. ... The web browser is executing on the client's computer. ... It's impossible to do what you want without the client going back to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Error refreshing a web page
    ... since my work has nothing to do with commerce, ... browser to pop up such a specific message, ... Environment: VS 2005 team developer, AJAX extensions, .NET 2.0. ... The browser's refresh button works fine UNTIL I click the button on the ...
    (microsoft.public.dotnet.framework.aspnet)