pycs-devel archive weblog

A blog for archiving the pycs-devel mailing list

2003-4-30

Georg Bauer: Re: [PyCS-devel] added ETag headers to comments.py and trackback.py

Hi!

> I know that Radio and NNW both look at the Last-Modified header, and I
> think they do ETags too. If you subscribe to a comment feed in Radio,
> do you see 304 messages in your log?

Me? Yep. But I am using PyDS and I _know_ that it supports ETag :-)

> You could always generate Last-Modified from the date of the last
> comment, I guess ... is it stored in a parseable format? (I can't
> remember :)

Yep, that would be possible, I actually thought about it, but it's more work
than just get a md5 hexdigest, so I just stopped after ETag worked ;-)

bye, Georg

Phillip Pearson: Re: [PyCS-devel] added ETag headers to comments.py and trackback.py

Great!

I know that Radio and NNW both look at the Last-Modified header, and I
think they do ETags too. If you subscribe to a comment feed in Radio,
do you see 304 messages in your log?

You could always generate Last-Modified from the date of the last
comment, I guess ... is it stored in a parseable format? (I can't
remember :)

Cheers,
Phil

On Tue, Apr 29, 2003 at 06:03:21PM +0200, Georg Bauer wrote:
> Hi!
>
> I just checked in a change to modules/system/comments.py and trackback.py
> to add an ETag header and to respect If-None-Match headers. This could
> preserve bandwidth if RSS aggregators reading the comment feeds respect
> the ETag header.
>
> Don't know how much aggregators support it, though. Last-Modified headers
> (and If-Modified-Since) would be possible, too - but would require more
> work.
>
> The way the ETag is generated: it's just a MD5 hex digest on the HTML
> source. So if it has the same content, it generates the same ETag. The
> ETag header is always added, so it will help with caches when accessing
> the normal HTML pages, too - as some browsers nowadays respect the ETag
> header (and many proxies do).
>
> The _content_ is allways generated, so this doesn't preserve CPU usage. It
> just preserves bandwidth by sending out a 304 instead of the content, when
> nothing changed. So it shouldn't break anything.
>
> bye, Georg
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> PyCS-devel mailing list
> PyCS-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pycs-devel

Georg Bauer: [PyCS-devel] added ETag headers to comments.py and trackback.py

Hi!

I just checked in a change to modules/system/comments.py and trackback.py
to add an ETag header and to respect If-None-Match headers. This could
preserve bandwidth if RSS aggregators reading the comment feeds respect
the ETag header.

Don't know how much aggregators support it, though. Last-Modified headers
(and If-Modified-Since) would be possible, too - but would require more
work.

The way the ETag is generated: it's just a MD5 hex digest on the HTML
source. So if it has the same content, it generates the same ETag. The
ETag header is always added, so it will help with caches when accessing
the normal HTML pages, too - as some browsers nowadays respect the ETag
header (and many proxies do).

The _content_ is allways generated, so this doesn't preserve CPU usage. It
just preserves bandwidth by sending out a 304 instead of the content, when
nothing changed. So it shouldn't break anything.

bye, Georg