POST vs. GET
Published on the 30th of January 2005
Skip to the Table of ContentsThere are two methods of passing data using forms on the internet. POST and GET. You set the form to use the different method by using this code for POST:
XHTML
<form action="url" method="POST">
And this code for GET:
XHTML
<form action="url" method="GET">
If you don't have the method="" part in the code the web browser will just use the GET method.
You are probably asking now what the difference between the two methods are. Here are the difference between them:
GET
The GET method uses the page url to send the data through. The URL of this page has the same format as the one the get method will output.
Pros:
- Is very fast.
Cons:
- Data like passwords are not secure as they can be seen in the url of that page.
- Only a small amount of data can be sent (255 but that includes the actual url as well).
POST
The POST method sends the data to the next page by making a file with the data in and then the next page picks up and reads the data in the file.
Pros:
- Very secure.
- Unlimeted data can be sent.
Cons:
- Slower then the GET method but still fast.
Conclusion
Both methods are just as easy to use as they both automatically put the data into variables that have the same name as the form object names. Most people use the POST method though because it can send lots of data in one go so you forms will always work. The GET method is still okay to use though.

