[Zope] Browser Sticky Fingers

Peter Sabaini sabaini@niil.at
Tue, 19 Oct 1999 17:45:28 +0200 (CEST)


At 16:49 19/10/99 , Jeff Rush wrote:
>Hmmm, I'm staring at web sites that -do- update their graphic
>content, such as weather display sites and the MRTG (network
>graph stats) program, and I don't see anything like a variable URL.
>
>How do they manage it?  The only new item I see is the use of:
>
><META HTTP-EQUIV="Refresh" CONTENT=300>
><META HTTP-EQUIV="Expires" CONTENT="...a date">
>
>While this would cause the HTML to refreshed periodically,
>how are they getting the browser to re-fetch the *images*?
>I've captured the HTML source for several iterations and the
><IMG SRC="blah"...> part never changes, so I would expect
>the same graphic would keep appearing on each cycle.

possibly the src= of the <img> points to a cgi program that returns "Expires:
(something soon)" headers so it wont get cached.

in perl pseudocode (sorry i'm not that accustomed to python yet) you'd write
something like this:

# this from thimble smith, tim@desert.net
# read image data 
$img = <wherever you get the image data from, gif assumed>
# print expires with date=now
print "Expires: ", scalar(localtime), "\r\n";
# or whatever content, then insert gif data
print "Content-type: image/gif\r\n\n$img"

hth?

peter.
-- 

_________________________________________________
peter sabaini, mailto: sabaini@niil.at
-------------------------------------------------