What are the key benefits of each http method? And is POST really slower than GET?
1. By default no proxy server or web browser is caching this data, you will always get the real data from you web server.
2. The length of data you can send to the web server is only restricted by the web server itself, but there is no real restriction.
3. Character encoding can be done easily using application/x-www-form-urlencoded.
1. Running a http request with GET can be cached on your web browser or a configured proxy server.
2. To get the live data from you web server you have to modify the url that is used in your XHR invoke, simply by using a counter or new Date().getTime() which will generate a unique url.
3. Maximum URL length is 2,083 characters in Internet Explorer (see MaxClientRequestBuffer: Use POST instead of GET to Send Large Amounts of Data in Request)
4. In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval.
5. Character encoding will reduce the amount of data that can be used because of url encoding entities (i.e. three Japanese characters are converted to this: %26%2312454%3B%26%2312455%3B%26%2312502%3B)