Dmitry Beransky wrote:
> 
> (Joshua, promise to let me know when you get tired of my "ideas" and I'll
> stop :-)
> 
> >No, this wouldn't make sense for most scripts which will
> >contain dynamic parts.
> 
> What about a situation when the content is been dynamically generated from
> a source that doesn't change often, but in an unpredictable fashion (e.g. a
> guest book or such)?  I realize that it impossible for ASP itself to know
> when the actual source has been changed, but it should be able to make an
> educated guess with some help from the author.
> 
> My original thought was to have a way to define file dependencies for an
> .asp file.  If any of these files has an mtime greater then
> 'If-Modified-Since,' then the .asp file gets processed, otherwise, the
> client gets NOT_MODIFIED.  Then I realized that the datasource may not
> necessarily be a file.  The data could be coming from a database, from
> another web server, etc., so a more general mtime discovery mechanism would
> be needed.  (perhaps a callback into the script?)
> 

How about some API extension, like $Response->LastModified($time)
that would automatically check the incoming If-Modified-Since
incoming header, and if set, and the LastModified time is
less, than would automatically call a $Response->End() and 
send the NOT_MODIFIED status?  There would also be a side affect 
of sending a Last-Modified header if an If-Modified-Since was 
not sent, or if Last-Modified is greater.

-- Joshua
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks >> free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

Reply via email to