Question about ETag header?
Igor Sysoev
is at rambler-co.ru
Sat Dec 16 10:27:55 MSK 2006
On Fri, 15 Dec 2006, Aleksandar Lazic wrote:
> On Sam 16.12.2006 00:41, Igor Sysoev wrote:
>> On Fri, 15 Dec 2006, Aleksandar Lazic wrote:
>>
>>> on the irc ( http://irclog.turbogears.org/archive/freenode/nginx )
>>> have been asked if it is possible to send a ETag-Header when the
>>> request is a static file.
>>>
>>> I have seen that you handle the ETag header in proxied request, how
>>> difficult is it to add the calculation to the static files?!
>>
>> It's easy to add, however, I do not see how ETag is better than
>> Last-Modified for static files.
>
> A nice short description is here:
>
> http://www.mnot.net/cache_docs/#WORK
>
> It looks to me that it makes some caches out there to cache the response
> from the origin server more reliable as in rfc2616
> (ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt) is written.
>
> 3.11 Entity Tags
> 13.3.2 Entity Tag Cache Validators
> 14.19 ETag
>
> I'am not sure if it's good or bad also how helpfull it really is, maybe
> someone on the list could help to understand this ;-)?!
I saw that browsers and cache proxies use Last-Modified as tag but not as
time value. If they want to revalidate response, they send If-Modified-Since
with the same value as they have received. MSIE adds ", length=XXXX" string.
nginx gets time in seconds from IMS header and does IMS == LM comparsion,
but not "IMS <= LM" comparsion to return 304.
> Btw.: How is the entity value calculated?!
Now Apache use "FileETag INode MTime Size" directive. Before Apache 1.3.23
the ETag was always formed as "inode-size-mtime" and the same files
from mirror image servers have the different ETags.
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list