What is the difference between POST and GET?

GET and POST are two different types of HTTP requests. HTTP requests sends data from client to server using GET and POST Method.

The main difference between POST and GET is that GET sends data to server through parameter string in web url while POST send data to server without visible data on web browser.

POST method is more secure compare to GET METHOD.

POST Method should be used for login, registration, forgot password, profile etc. for security reason.  GET requests should never be used when using with sensitive data. GET requests should be only used to request data by id, name etc.

GET requests can be bookmarked whereas POST requests cannot be bookmarked.

Data sent by GET method can be accessed by $_GET variable in php. Data sent by POST method can be accessed by $_POST variable in php.

GET can send less amount of data depending on web browser limitation whereas POST can send large amount of different type of data like file upload, forms to server. POST requests don't have any restrictions on data size.

GET requests can be cached whereas POST requests are never cached.

GET requests remain in the browser history whereas POST requests do not remain in the browser history.

 

 

 

 

 

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

12709