METHOD

The METHOD attribute specifies how the data will be transmitted to the
HTTP server. When GET is used, the data is appended to the end of
the designated URL after a question mark. For an example, see Section
16.1 (How HTML Forms Transmit Data). GET is the default and is
also the method that is used when a browser requests a normal URL.
When POST is used, the data is sent on a separate line.
The advantages of using the GET method are twofold: the method is
simple; and with servlets that use GET, users can access those servlets
for testing and debugging without creating a form, simply by entering
a URL with the proper data appended. On the other hand, due to
URL size restrictions on some browsers, GET requests have limits on
the amount of data that can be appended, whereas POST requests do
not. Another disadvantage of GET is that most browsers show the URL,
including the attached data string, in an address field at the top of the
browser. This display makes GET inappropriate for sending sensitive
data if your computer is in a relatively public place.

0 comments: