dcsimg
Need your suggestions and ideas on XMLHttpRequest aggregation.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, February 21, 2007 10:46 PM

Now I want to develop a library to provide the function that will aggregate the HTTP request send by XMLHttpRequest. For example, I will aggregate all HTTP GET requests and when encountering the HTTP POST request, all aggregated ones will be sent to the server together. Now I am not very sure or clear following issues. I need your ideas: 1. Does it make sense ? I mean the most important advantage of Ajax is very responsive. If I blocked the requests, will it destroy this advantage ? 2. What kind of requests should I aggregate ? Currently, I just want to aggregate all GET requests for a specific server until a HTTP POST request occur. What is your idea ? Thanks a lot, Eri   More>>


Now I want to develop a library to provide the function that will aggregate the HTTP request send by XMLHttpRequest. For example, I will aggregate all HTTP GET requests and when encountering the HTTP POST request, all aggregated ones will be sent to the server together.


Now I am not very sure or clear following issues. I need your ideas:


1. Does it make sense ? I mean the most important advantage of Ajax is very responsive. If I blocked the requests, will it destroy this advantage ?


2. What kind of requests should I aggregate ? Currently, I just want to aggregate all GET requests for a specific server until a HTTP POST request occur. What is your idea ?


Thanks a lot,


Erica

   <<Less

Re: Need your suggestions and ideas on XMLHttpRequest aggregation.

Posted By:   Anonymous  
Posted On:   Sunday, March 4, 2007 10:09 AM

Hi Erica,


You made the answer too along with the question.

The main use of AJAX is to make the page more responsive.

Now, GET or POST is only a mechanism with which we send the data.

A GET request can only handle a URL up to 1024 characters.

If your request URL might go more than that length, then you switch to using POST.

People generally use GET requests with AJAX because it is faster than POST in
the sense of encrypting and decrypting data in the body of the request.


If you want to do lazy processing, like get the data at once when the request URL
exceeds 1024 characters in length, then you can use a POST request and gather data till that point.


To me using GET and fetching data then and there is a wise and clean solution.
About | Sitemap | Contact