> The  Request  class  can  handle  GET,  POST,  PUT  and  DELETE HTTP
> requests, but I haven't seen anything regarding HEAD requests. These
> can  be  easily  done with curl or Python, for example. Any ideas of
> how to implement HEAD requests with ajax and MooTools?

I  think  some  changes are necessary in core; I haven't looked at the
source  but  method:  'HEAD'  seems  to be swallowed and turned into a
POST.

IMO,  HEAD  is overrated. It may explicitly conserve bytes on the wire
but  doesn't  necessarily conserve processing on the server unless you
specifically code for it.

For  example,  you  can  stick  with  GET and add a custom header like
x-http-method:  HEAD,  then  have  the  server-side code intelligently
short-circuit  processing  and  just  send  the  response  headers and
exit...  that's  more  efficient  than  a  dumb HEAD, where the server
executes  all  the  server-side  code  and then the SAPI layer blindly
truncates the response.

-- S.

Reply via email to