Originally Posted by cancer10
There must be some way because when you login to gmail, it shows a progressbar and increments the value of the meter according to the objects / elements rendered in the browser.
The only two things you can do that will work in all browsers is split your request up into several smaller ones, so you can monitor how many of those have come back already, or regularly poll the server for a progress report. Whether any of those add to the user experience is doubtful.
If you don't care about browser compatibility, there are several ways. If you make your server send a Content-Length header, so the browser actually knows what to expect, you can use the onprogress event of the XMLHttpRequest, if supported, or readystate 3, if supported.