Re: last update

Imagine More!!! wrote:
++ Hi everybody!
++ I was lurking for a long time enjoying your discussions and learning new
++ things :)
++ I was writing a perl cgi script for "last updates". I have almost finished
++ it. It seems working.  I was thinking to post it to the list but i saw a
++ problem. 			
++ The idea is to check the last edition date of the file (e.g the html file
++ of the current page) and print out in the current page at a proper place
++ as the page is being displayed by the visitor's browser.
++ However I got a problem. I could not figured out how to invoke it in a web
++ page. How can i refer to a cgi-bin program without any "click here"s?. It
++ should be invoked as the page appeared. 
++ Some counters are displayed for example as:
++ <img src="/cgi-bin/foo.cgi">
++ So the image, which is produced by foo.cgi, is displayed on the screen as 
++ the page is appearing, without any clicking.			
++ I need something like that. The output produced by my perl script should
++ be displayed just like the image above. I though there must be a tag
++ proper for that but i could not find it. 
++ Could you help me please? :)

I seriously object against this approach, and object against
Jon Wallis' suggestion of SSI's too. Both your and Jons suggestions
use unnecessary bandwidth. Your image is generated by a CGI, and
hence always "fresh", so it will never trigger a 304 not modified
response (a lot of caches don't cache anything from cgi-bin anyway).

For SSI, this is similar. A document with an SSI will be generated
the moment it's requested, hence the document is always "new". So,
in this case, it will not trigger a 304 response, but the whole
document is send.

However, this is really not needed, as it is static information, which
only needs to be updated when the document changes. Why not use the
Perl script to put the last modified information *in* the html document?

I use a Perl script which put a simple trailer at the end of each file
I make, with a last modified date, copyright notice and email address.
It's only a few lines, and it's inserted right before </body>. When
included in the html file itself, proxying and caching will still work,
and those with in line images off get the information as well.


Received on Monday, 8 January 1996 12:26:22 UTC