• Post Reply Bookmark Topic Watch Topic
  • New Topic

HEAD, OPTIONS, and TRACE  RSS feed

 
ashok ganesan
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
under what circumstances a web browser will generate HEAD, OPTIONS, and TRACE requests.
ps:
( i have studied that get or post request is generated according to the value "method" attribute of the form tag but how about these three )
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding head requests, the specification has this to say:


This method is often used for testing hypertext links for validity, accessibility, and recent modification.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GET is used for accessing all resources (HTML, images, CSS, JS, applets, Flash, ...), while POST is only used in forms.

HEAD is the same as GET, except that it only returns the HTTP header, not the body. As such it may be useful to determine if a server resource has changed by inspecting the Last-Modified header of the response. I'm not sure if any current browsers do that, though. TRACE, OPTIONS, PUT and DELETE aren't used by current browsers (although the JavaScript XmlHttpRequest can generate them).
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
(although the JavaScript XmlHttpRequest can generate them).


That too is browser-dependent; some implementations of XHR turn the "odd" HTTP method types into a GET.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!