[typo] Etag / Last-Modified headers

Alastair Rankine arsptr at internode.on.net
Wed Sep 13 09:11:36 EDT 2006


One question that has been bugging me about Typo for a while now is:  
does Typo emit Etag or Last-Modified HTTP headers, suitable for web  
caches to use? This is particularly important for the oft-requested  

Today I finally took the time to find out. The answer seems to be  
that Typo doesn't emit either of these headers.

So, the obvious next question is: how hard is it to add one of these  
headers? And what about the corresponding conditional GET?

Dan Kubb's REST controller for rails (http://onautopilot.com/oss/ 
rails/rest_controller.rb) looks to provide a leg-up, but we still  
need to calculate the actual header ETag and Last-Modified values.  
These need to be set as instance variables in the XML controller.  
Could the *_feed.rxml views be used to set these? In particular it  
looks like the Last-Modified value could be set from prettymuch the  
same value used for the Atom "updated" field (ie  
@items.first.updated_at.xmlschema) - a fairly low impact change I  
would think? ETag might need something a big more sophisticated...

This is obviously not very well thought through, but are there any  
initial reactions?

More information about the Typo-list mailing list