AJAX POST over GET Jul07 '06
One problem I have with using "GET" AJAX requests is that the data sent over is transmitted as it would be in a URL string, meaning you have to watch out for invalid characters, such as #, &, etc.
On typical web forms, where the user is allowed to enter whatever they want, there is no way to be sure they won’t enter invalid characters.
However, when using "POST" AJAX requests, there are no such worries.
I’m beginning to think it’s better to just submit everything as "POST," except for the simplest of data (like a single number or letter).
Not to mention - I almost forgot, a "GET" AJAX request is limited to a certain number of characters, and server restrictions, whereas a "POST" request has no such limits.
Are there any advantages to using "GET?"
Categories: Web Development ![]()
Add Feedback (view all)
Leave feedback
Well I was thinking from more of a "convenience" perspective - not security. If I can submit everything via "POST" and not have to check for invali ... Read more.
matthom
is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from Chicago.
Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.
Similar Entries
- AJAX/Andy/Matt meeting review (2 recent visits)
- AJAX select list issue in IE6 (362 recent visits)
- AJAX requests in web site template (80 recent visits)
- Invalid characters for AJAX script (149 recent visits)
- Scary AJAX error (582 recent visits)
- AJAX meeting brief 1 (5 recent visits)
Stats
26 unique visits since August 2008
Recent Referrers (click)
- http://matthom.com/archive/200
- there
- http://matthom.com/archive/200
- http://matthom.com/archive/200
- http://matthom.com/archive/200
- http://matthom.com/archive/200
- why use post over get
- http://matthom.com/archive/200
- http://matthom.com/archive/200
- http://matthom.com/archive/200
- http://matthom.com/archive/200
- http://matthom.com/archive/200
- http://matthom.com/archive/200
- there
- http://matthom.com/archive/200
- http://matthom.com/archive/200
- http://matthom.com/archive/200
None. Because you should be validating any input from the user. The only instance in which I can see it being better is if you want to allow the us ... Read more.