I’ve a situation wherein I’ve to choose between two options.
- I’ve to make three different ajax requests to three jsps each of which returns say 30kB of data.
- I’ve to make one ajax request to just one jsp which say has 300kB of data. But I would be using only 90kB of it.
Which of these options should I prefer ?
This question just boils down to ‘how much of overhead is involved in an ajax call?’ .
Also, please note that I’ve to perform the above steps repeatedly.
Thanks
You could run your tests with Fiddler2 to check the size of each package and overhead.
You’ll see that:
Expect overheads smaller than 1 kB for each request.
Only cookies can increase that amount above that threshold.