Sunday, July 29, 2007

HTTP Head method

HTTP HEAD request is similar to HTTP GET request except that the Server will not send and response body in response to the request. e.g. if you make a HEAD request to resource /image/test.jpg, server will send only the response status to the client (200 if the image exists) the actual image will not be transmitted to the client. This is useful in cases where you are referring an external resource and not sure if a resource exists on server or not. Or you want to know if you have access to certain resource on server, or ever if you just want to know when the resource on the server was last modified.

The HEAD request can be very useful specially with AJAX calls.

No comments: