which method work fast GET() or POST() ?

Recommended Answers

Most find that speed is not the issue
post is better for some purposes, get for others
this discussion may help
http://stackoverflow.com/questions/1211881/why-get-method-is-faster-than-post

Something not mentioned on that link is that POST requests are not …

Jump to Post

All 4 Replies

Most find that speed is not the issue
post is better for some purposes, get for others
this discussion may help
http://stackoverflow.com/questions/1211881/why-get-method-is-faster-than-post

Something not mentioned on that link is that POST requests are not cached. GET requests are, and thus reduce the load on your server. Subsequent requests using GET will appear much faster, since the request will actually be taken mostly from the browsers cache, and or intermediate HTTP caches. So for anything that doesn't modify data on your server, use a GET. If you want the data to never be cached, use post.

commented: I didn't know that, but it makes sense. +6

Something not mentioned on that link is that POST requests are not cached. GET requests are, and thus reduce the load on your server. Subsequent requests using GET will appear much faster, since the request will actually be taken mostly from the browsers cache, and or intermediate HTTP caches. So for anything that doesn't modify data on your server, use a GET. If you want the data to never be cached, use post.

Thanks, another bit I didn't know

If you want to follow REST or RESTful urls such as the REST architecture states (which seems to be getting more popular) then GET and POST have two very different uses. GET should be used to 'get' data while POST should be used to 'post' or 'create new instances of' types of requests.

GET/POST/PUT/DELETE all have their purposed but people are using them without keeping their initial purpose in mind.

More info here:
http://en.wikipedia.org/wiki/Representational_State_Transfer

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.