1

I need to insert some data to DB. So for some reason (like CORS and other), I used a Get request for this. But my doubt is that, Is there any performance difference in using either a Get or a Post Request for performing some data insertion?

I mainly want to know- Is there any additional waiting for a Get Request than a Post request. I didn't get an exact answer for this question when I searched in Google.

Thanks in Advance

Saidh
  • 1,101
  • 1
  • 12
  • 21
  • There won't be any difference.. Are you okay with "third party" seeing your content? – Vishal Sharma Oct 30 '15 at 05:07
  • Possible duplicate of [What is the difference between POST and GET?](http://stackoverflow.com/questions/3477333/what-is-the-difference-between-post-and-get) – Rayon Oct 30 '15 at 05:08
  • @Vishal: The data sending is not a private one and no matter other seeing the content. – Saidh Oct 30 '15 at 05:31
  • Then it is fine.. go for GET, won't make an "eye catchy" difference – Vishal Sharma Oct 30 '15 at 05:32
  • @Rayon: Some page load time tools returns different load time in Get and Post request. Didn't get a clear answer for this doubt from other questions. – Saidh Oct 30 '15 at 05:34

2 Answers2

1

There is inherently no difference between an HTTP GET and an HTTP POST in performance. The only difference between these as far as the server is concerned is a few characters in the header of the request.

What matters is how the data is entered into the database by the web server and to know this, you need to know more about how the webserver handles requests.

Julian
  • 414
  • 2
  • 8
  • Some page load time tools returns different load time in Get and Post request, thats my doubt – Saidh Oct 30 '15 at 05:36
  • 1
    Any difference would be based on the implementation of the server. You would need to know more about the webserver in order to how to get the best performance. – Julian Oct 30 '15 at 05:52
1

yes we can post data using get request also like post request ,But main difference is by using get request we can't send more than 256 characters but using post we can send more data..

roshini
  • 112
  • 6
  • Yeah, but i want to know is there any additional waiting for a Get request over Post request? – Saidh Oct 30 '15 at 05:20
  • if you read or know more about GET and POST requests then you will get clarity about performance all. – roshini Oct 30 '15 at 07:58