Re: Dynamic HTML from Python Script
- From: Dave Parker <daveparker@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 Jun 2008 04:10:41 -0700 (PDT)
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/
.
- References:
- Dynamic HTML from Python Script
- From: asdf
- Re: Dynamic HTML from Python Script
- From: Aidan
- Re: Dynamic HTML from Python Script
- From: asdf
- Re: Dynamic HTML from Python Script
- From: Aidan
- Re: Dynamic HTML from Python Script
- From: asdf
- Re: Dynamic HTML from Python Script
- From: Lie
- Re: Dynamic HTML from Python Script
- From: Dave Parker
- Dynamic HTML from Python Script
- Prev by Date: regex for balanced parentheses?
- Next by Date: Plotting Graphs using Gnuplot
- Previous by thread: Re: Dynamic HTML from Python Script
- Next by thread: Re: Dynamic HTML from Python Script
- Index(es):
Relevant Pages
|