HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: Where I can find the ETag of a file
Author: Xavier Roche
Date: 05/08/2002 09:55
 
> I'd like to know where I can find the ETag of a file 
> (for example: '4ae89d-3fb0-3as45dba') which is used 
in 
> the file new.dat for identifying it.
> Is there a program or an instruction to obtain it?
Well, the Etag (introduced in RFC #2616) is an opaque 
string which purpose is to identify a ressource, for 
updating purposes. This opaque string can only be 
generated (and treated) by the remote server, and 
therefore you can only get it when requesting a file 
(either using GET or HEAD requests if you only want 
this information)

An typical Etag is the generated MD5 hash, in 
hexadecimal notation ; for example the "foobar" string 
has 3858f62230ac3c915f300c664312c63f as md5 hash.

When generating a ressource (an html page, a gif 
image..) the server generate an unique etag (to "tag" 
the requested information). If the client then wants 
to update it, it sends with its request the previous 
Etag. The server will compare the previous etag and 
the one which is to be generated ; and if identical, 
will reply "This page/file was not updated"

This system is MUCH more powerful than the timestamp 
updating system, because you can theorically cache any 
information (dynamically generated, resulting from a 
posted data, weather dependant..) depending on the 
server implementation.
 
Reply Create subthread


All articles

Subject Author Date
Where I can find the ETag of a file

05/08/2002 09:40
Re: Where I can find the ETag of a file

05/08/2002 09:55




c

Created with FORUM 2.0.11