Menu:

Recent Entries

Categories

Archives

Links

Blogs
- Dflying's Night
- David's Untitled Life
- Dflying's Blog in Chinese

This blog is hosted by DreamHost!

Syndicate

RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3

XmlHttpRequest – Choose GET or POST?

Dflying | 10 March, 2006 20:24

XmlHttpRequest supports both GET and POST requests to the server, which one should we use? As usual, GET is light and POST is heavy. But I'd say, it really depends on your scenario.

GET requests pass parameters to the server using the query string. So we need to be careful about:


POST requests pass parameters to the server using forms. You do not have the GET 2048 query string limitation and can easily pass all form data from the current form to the server. You can even pass the ASP.NET ViewState of the page to the server and try playing with control state and the ASP.NET lifecycle, which is really cool. However, passing all form data will slow down the response time, so you do need to be careful what you pass to the server.

Posted in JavaScript & AJAX. Comment: (4). Trackbacks:(100). Permalink
«Next post | Previous post»

Referers

Comments

  1. 1. blueoxygen  |  03/11,2006 at 00:38

    IE's cache whe using XHR object and GET mothod is really self-assertive.FF will leave the decision to the developer.

  2. 2. fcuznxer  |  10/17,2008 at 01:30

    ucrjseyr http://egmdalcp.com knqlbnxn ksenzbec jzhejshs [URL=http://ieeaskow.com]ukygfgqj[/URL]

  3. 3. tkexvmxw  |  10/25,2008 at 02:37

    bxqynusa [URL=http://iboyczji.com]pjbncflk[/URL] reotyyuy http://iipodcqo.com aocgjbpz yvwxgjlw

  4. 4. eafogszt  |  10/28,2008 at 09:29

    xkddqqgf http://thmdtbyd.com cykynaqh hysmhztu [URL=http://lcbimcmc.com]rmhngxil[/URL] rmfncxcv

Leave a Reply

Auth Image