I understand what a HEAD request is, and what it could be used for. Will any standard, modern browser ever send a HEAD request? If so, in what context?
A browser will send a HEAD
request if that is explicitly requested in an XMLHttpRequest
, but I'm fairly certain that the browser will never send a HEAD
request of its own accord. My evidence is that the Tornado web server defaults to returning an error for HEAD
requests and I've never heard of anyone running into problems related to this (or even being aware of it).
HEAD
is mostly obsolete IMHO: on a dynamic web site it is unlikely to be significantly more efficient than a GET
, and it can usually be replaced by one of the following:
GET
with If-Modified-Since
or If-None-Match
(used for caching)GET
with Range
header (used for e.g. streaming video)OPTIONS
(used for CORS preflight requests)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With