Re: [Zope-dev] Last-modified and bobobase_modification_time

2002-06-16 Thread Chris Withers

  BTW: This list if for development *of* Zope, the [EMAIL PROTECTED] list is
  better for questions bout developing *with* Zope.
  
 Thanks for your codes indeed. I posted it here because I thought only 
 people have high developing skill care about whether their web 
 pages are up-to-date to their readers and so care the HTTP Last-modified 
 header. 

Why do you think that? Surely all zope users will care about this? ;-)
Besides, that's not the point, re-read Casey's email more carefully...

 Although I'm new to Zope, I'm not new to mailing list. I know the 
 mailing list rule but I just don't agree with your classification of my 
 question. 

Well, I second Casey's opinion :-P

cheers,

Chris


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Last-modified and bobobase_modification_time

2002-06-16 Thread Wei He

On Sun, 16 Jun 2002, Chris Withers wrote:

   BTW: This list if for development *of* Zope, the [EMAIL PROTECTED] list is
   better for questions bout developing *with* Zope.
   
  Thanks for your codes indeed. I posted it here because I thought only 
  people have high developing skill care about whether their web 
  pages are up-to-date to their readers and so care the HTTP Last-modified 
  header. 
 
 Why do you think that? Surely all zope users will care about this? ;-)
 Besides, that's not the point, re-read Casey's email more carefully...
 

I don't think so. There are quite ofter a user should click CTRL and the 
refresh button to get the up-do-date page. This is because the 
Last-modified header not properly set. If DTML doesn't care about the 
modification time of it's code segments, it will definitely returns the
template's modification time although the contents are keep on changing.

My conclution is that if DTML doesn't do this or dosen't provide a simple 
way to do that, Zope may not care about the header at all. So dynamic webpage
authors with basic skill could never control it. Only people have developing
skill may do. Am I right?

Here is Casey's email:

 There is no automatic way in which DTML can do this for you. This is
 simply because dtml-var foo doesn't tell Zope what foo is. Is it a

No mater what foo is, there is surely a last modification time of foo.
If it is a document. that's easy. If it is a script, there should be a 
method like self.setLastModificationTime(scriptTime). This method should 
decide if scriptTime is newer than DTML document's own update time and set 
it if so. Then it's up to the script writer to call the method with the 
current time if he/she want to disable browser's caching function.

 document or a script that returns something different every time it is
 called or something else? In fact foo might different things at
 different times, if you aquire the template into different contexts.

What stops the main DTML document from knowing the last modification time 
of foo? 

In fact, Casey's script is just a walk-around. Script writers should 
manually create a list containing all code segments he/she dtml-vared.
(Sorry for using this phrase to express my disagreement on choosing 
dtml-var against dtml-include). It's a boring task if there are many 
nested code segments included.

I'm a PHP user for several years and I'm try to migrate part of my 
projects to Zope. Changing from PHP to DTML/Python is not a big deal. 
But I'm so used to the easy environment PHP provides coders. 

Wei He



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Last-modified and bobobase_modification_time

2002-06-16 Thread R. David Murray

On Sun, 16 Jun 2002, Chris Withers wrote:
 Why do you think that? Surely all zope users will care about this? ;-)
 Besides, that's not the point, re-read Casey's email more carefully...

  Although I'm new to Zope, I'm not new to mailing list. I know the
  mailing list rule but I just don't agree with your classification of my
  question.

 Well, I second Casey's opinion :-P

Well, there's two aspects to this.  The first one is the quesiton of
*why* the last modified header is currently that of the outermost
page template.  That's a [EMAIL PROTECTED] question.  The second is
the question of whether or not that is the right behavior, and what
it would take to make Zope smarter such that the last modified header
would actually be accurate.  The answer to that may be, there is no
implementable algorithm that will work.  That question still probably
doesn't belong on zope-dev, though, but instead on zope3-dev grin.

--RDM



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )