[thelist] GET requests and sent content

Marcus Andersson marcus at bristav.se
Mon Oct 11 16:01:57 CDT 2004


Paul Bennett wrote:
> Morning all,
> I have recently begun a new job and am involved in building some  web 
> applications which will and do get a substantial amount of traffic. The 
> applications have been coded so far to use all sorts of client-side JS 
> to package and post form requests (some via get, some via post, some via 
> the xmlhttp object). I have been told that the focus is on minimizing 
> the size of the data flowing between the client and server.
> 
> Now I am definiteley one to avoid javascript when there is a built in 
> browser function which does the same thing by default. I have been told 
> by the very knowledgable lead developer that normal form get and post 
> requests also send back the entire html of the page they are on and 
> hence they use JS to minimize the size of the sent data.
> 
> This to me seems ludicrous. 

To me too. I see two (main) reasons to use js in posting data to the server:
1) You need to process data before sending in some way (one example: validate on client to give faster 
feedback to the user (which is a good thing))
2) To minimize traffic from the server to the browser (ie you perform the post with XmlHttp or hidden iframes, 
that way you only need to transfer the actual data updates and no presentational markup). This points is 
related to what your lead developer says but the win is in the opposite direction from what he/she says.
3) You want to get away from the uglyness of doing the constant page refreshing/repaints that is the curse of 
web *applications* (ie you want to simulate a rich client in the browser)

/Marcus


More information about the thelist mailing list