[PyCS-devel] added ETag headers to comments.py and trackback.py
Status: Alpha
Brought to you by:
myelin
|
From: Georg B. <gb...@mu...> - 2003-04-29 16:07:52
|
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 |