May 2001
Intermediate to advanced
1088 pages
30h 13m
English
You might wonder why someone would choose to do a GET instead of a POST or vice-versa. Why is there even a choice? When you send form data using the GET request, you're really taking advantage of a performance hack. By appending the form variables to the end of the pathname, you simplify the work that the server needs to do, because it takes a little more work to read posted data. For example, the corresponding GET request for the form data posted from the PostForm page looks like this:
GET /?foo=Foo%21&bar=Bar%3F&baz=%3C%3CBAZ%3E%3E HTTP/1.1
There is a limit to the length of the pathname for a GET request, however, so if the total length of your form variables is pretty long—more than 4,000 bytes—you can't use a GET request ...
Read now
Unlock full access