List Info

Thread: Etag / Last-Modified headers




Etag / Last-Modified headers
user name
2006-09-13 13:11:36
Typographers,

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  
feeds.

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/os
s/ 
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?
_______________________________________________
Typo-list mailing list
Typo-listrubyforge.org
http:
//rubyforge.org/mailman/listinfo/typo-list
Etag / Last-Modified headers
user name
2006-09-13 15:34:37
File a bug, and I'll look at it when I can.  Last-modified
is easy
enough, we'll just add it to our cache code.  I'm not sure
about
etags.


Scott

On 9/13/06, Alastair Rankine <arsptrinternode.on.net> wrote:
> Typographers,
>
> 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
> feeds.
>
> 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/os
s/
> 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?
> _______________________________________________
> Typo-list mailing list
> Typo-listrubyforge.org
> http:
//rubyforge.org/mailman/listinfo/typo-list
>
_______________________________________________
Typo-list mailing list
Typo-listrubyforge.org
http:
//rubyforge.org/mailman/listinfo/typo-list
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )