You're reading that a bit wrong - there's nothing about the
XMLHttpRequest.
prototype.
getAllResponseHeaders method that has anything to do with whether the request will retrieve the entire file or not. And the example doesn't state that, either.
What the example does state is correct however: To request only the headers of a resource you can use the HEAD request type instead of GET or POST. The request type has nothing to do with the use of
XMLHttpRequest.
prototype.
getAllResponseHeaders, the method will retrieve the response headers for ANY type of requests after the request has already been made.
Note:
The example doesn't actually make a HEAD request
Quote:
Code:
xmlhttp.onreadystatechange=state_Change
xmlhttp.open("GET",url,true)
xmlhttp.send(null)
|
As you see, the example is making a GET request and not a HEAD request. So the statement about HEAD requests doesn't have much to do with the actual example script. I take it that the authors haven't quite understood what they are trying to explain...
Edit: Yes, you should send them an angry mail... or at least some type of feedback