HTML form method="HEAD"

html form method put
html form action
html form post example
html form submit
html form submit with header
form method=post'' action
how to pass parameters in form action in html
html form method=delete

I've never seen this before, I've always known there was either GET or POST. And I can't find any good documentation.

GET send variables via the URL. POST send it via the file body?

What does HEAD do?

It doesn't get used often, am I correct? doesn't even mention it.

HTML’s method attribute only allows GET and POST.

HTML input formmethod Attribute, Definition and Usage. The formmethod attribute defines the HTTP method for sending form-data to the action URL. The formmethod attribute overrides the method� The method attribute of the form element tells the web browser how to send form data to a server. Specifying a value of POST means the browser will send the data to the web server to be processed. This is necessary when adding data to a database, or when submitting sensitive information, such as passwords.

The HEAD method is used to send the request and retrieve just the HTTP header as response. For example, a client application can issue a HEAD request to check the size of a file (from HTTP headers) without downloading it. As Arjan points out, it's not even valid in HTML forms.

What Form Method Tells Your Web Browser In HTML: An Easy , The method attribute. The method attribute defines how data is sent. The HTTP protocol provides several ways to perform a request; HTML form� The form-data can be sent as URL variables (method="get") or as an HTTP post transaction (method="post"). Notes on the "get" method: This method appends the form-data to the URL in name/value pairs This method is useful for form submissions where a user want to bookmark the result

HTTP method HEAD sends the response's headers but without a body; it's often useful, as the URL I've given explains, though hardly ever in a "form" HTML tag.

Sending form data, The HTML <form> method Attribute is used to specify the HTTP method used to send data while submitting the form. There are two kinds of� The HTML <form> method Attribute is used to specify the HTTP method used to send data while submitting the form. There are two kinds of HTTP methods, which are GET and POST. The method attribute can be used with the <form> element.

The only thing I can imagine is that the server may actually have been set up to validate the request method, to discover submissions by robots that for HEAD might actually use a different method than a browser does. (And thus reject those submissions.)

A response to a HEAD request does not imply nothing is shown to the user: even a response to HEAD can very well redirect to another page. However, like Gumbo noted: it's not valid for the method in a HTML form, so this would require a lot of testing in each possible browser...

For a moment I wondered if HEAD in a form is somehow used to avoid accidental multiple submissions. But I assume the only useful response would be a 301 Redirect, but that could also be used with GET or POST, so I don't see how HEAD would solve any issues.

A quick test in the current versions of both Safari and Firefox on a Mac shows that actually a GET is invoked. Of course, assuming this is undocumented behavior, one should not rely on that. Maybe for some time, spam robots were in fact fooled into using HEAD (which would then be rejected on the server), or might be fooled into skipping this form if they would only support GET and POST. But even the dumbest robot programmer (aren't they all dumb for not understanding their work is evil?) would soon have learned that a browser converts this into GET.

(Do you have an example of a website that uses this? Are you sure there's no JavaScript that changes this, or does something else? Can anyone test what Internet Explorer sends?)

HTML, The action attribute of the FORM element defines where to send the form data, and the method attribute specifies the HTTP method for sending the form data. The formmethod attribute specifies which HTTP method to use when sending the form-data. This attribute overrides the form's method attribute. The formmethod attribute is only used for buttons with type="submit". The form-data can be sent as URL variables (with method="get") or as HTTP post (with method="post").

HEAD Method

The HEAD method is functionally like GET, except that the server replies with a response line and headers, but no entity-body. Following is a simple example which makes use of HEAD method to fetch header information about hello.htm:

HEAD /hello.htm HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Following will be a server response against the above GET request:

HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
ETag: "34aa387-d-1568eb00"
Vary: Authorization,Accept
Accept-Ranges: bytes
Content-Length: 88
Content-Type: text/html
Connection: Closed

You can notice that here server does not send any data after header.

-Obtained from

HTML Tags/Form Tags/method and action URL, The HTML form method attribute defines how to send form-data that means to be sent as URL variable or to be sent as an HTTP post� The <form> tag is used to create an HTML form for user input. The <form> element can contain one or more of the following form elements: <input> <textarea> <button> <select> <option> <optgroup> <fieldset> <label> <output>

HTML Form method Attribute, This attribute specifies which HTTP method will be used to submit the form data set. Possible (case-insensitive)� method The purpose of the HTML method attribute is to define the HTTP method used to submit the form.

Forms in HTML documents, XHTML 1.x forms only support GET and POST. GET and POST are the only allowed values for the "method" attribute. The HTML <form> element represents a document section containing interactive controls for submitting information. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone and send us a pull request.

Using PUT method in HTML form, DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>Тег FORM, атрибут method</title> </head> <body> <form action="handler.php" method=" post">�

  • Any examples of sites that use this?
  • And any browser that actually sends the HEAD rather than converting it into a GET (like both Safari and Firefox on a Mac are doing)?
  • It's illegal in HTML forms though.