2

On this page by Yahoo, it says that GET requests are faster than POST requests because the browser breaks POST requests into 2 packets.

However, that article seems at least a decade old. Is that information still accurate? It seems ridiculously easy for a browser developer to make POST just as fast as GET.

I see a lot of people saying GET is twice as fast. But sending 2 packets does not take twice as much time as sending 1 packet. Could this possibly be because POST is doing a preflight test and GET is not?

I was not able to find any recent information about how browsers handle packets for GET and POST methods.

4
  • 2
    It isn't even clear how old that Yahoo article actually is. It doesn't have a date that I can find. Apr 11 at 18:43
  • @StephenOstermiller Yeah I guessed the age based on the datestamps in the sample headers (2010). Also it mentions things like iframes, flash files, ... Apr 11 at 18:47
  • Faster...by how much? It would have to be microseconds. Is it worth worrying about?
    – Steve
    Apr 12 at 3:05
  • Anecdotally, I have seen claims that POST is 90ms and GET is 45ms. Apr 12 at 8:00

1 Answer 1

3

The Yahoo page you linked references Internet Explorer and HTTP/1.1, neither of which are involved in the majority of web traffic anymore. The article also references TCP, which is already on its way out as a web traffic transport with the adoption of HTTP/3. So I think it's safe to say that the info in that article is completely outdated, and it's impossible to draw any modern conclusions from it.

In general, the decision of whether to use GET or POST should be informed by the semantics of the request and the resulting idempotence, caching and security characteristics, not by performance.[1][2][3] Both methods are performant on modern web stacks, so unless you're hyperoptimizing a firehose of web requests to a fortune-500 web company, the difference is unlikely to have any significance.

[1]: Get vs Post Performance - Stack Overflow

[2]: Why is the GET method faster than POST in HTTP? - Stack Overflow

[3]: When do you use POST and when do you use GET? - Stack Overflow

1
  • Thank you, that makes a a lot of sense. Apr 16 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.