Random ...
 
December 2017
S M T W T F S
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Tags ...
Links



python+zope++:: Last-modified header
Posted at 21.Feb,2008 17:36  Comments 1 / Trackbacks 0 / Like this post!
Technorati tag(s):

Here's a note to self re setting Last-Modified date for better cacheability.

Create a Script Python, call it setmyheader:

  r=context.REQUEST
  r.RESPONSE.setHeader('Last-Modified',' '.join(context.bobobase_modification_time().toZone('GMT').rfc822().split()[:-1])+' GMT')

and call it from your header. One caveat, the modification_date used will always be the parent, ie: http://mydomain.com/some/folder/setmyheader, will get the folder modification_date.

Do correct me if I'm wrong.


Bookmark and Share

Is this entry helpful? Comments/Donate/Click some google ads.  
Trackback is http://myzope.kedai.com.my/blogs/kedai/179/tbping 

Comments
kk

kkk

kk  at 26.Feb,2008 22:21
Post a comment