Would anyone advice me when and how i can use the 'head' request.. that will invoke the doHead() method on a servlet?
Pl. brief what is the effect of the response made within the 'doHead()' method.
Thanks in adv...
Best regards,<br /> <br />vanchin
Author and all-around good cowpoke
Joined: Mar 22, 2000
From the HTTP 1.1 documentation RFC2616
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification. The response to a HEAD request MAY be cacheable in the sense that the information contained in the response MAY be used to update a previously cached entity from that resource. If the new field values indicate that the cached entity differs from the current entity (as would be indicated by a change in Content-Length, Content-MD5, ETag or Last-Modified), then the cache MUST treat the cache entry as stale.
I think the most important use is to determine the last modification date of a page to save on bandwidth and CPU time. Bill [ May 29, 2004: Message edited by: William Brogden ]
"Vanchin Vanchin", Sorry, but your name does not comply to the JavRanch naming rules. Please see them here.
We require your display name to be two words: your first name, a space, then your last name. Obviously fictitious names are not allowed. Please edit your profile and fix you display name.
Accounts with invalid display names get deleted, often without warning, and you have 33 posts with an invalid display name. Your account is likely to be closed soon, so please update your display name immediately.