Q:

jQuery - How to check the size of the response object in an AJAX call?

I want to know the size (in kbyte / byte) of the response to an ajax call (.get, .post, .ajax) - any ideas?
Thanks!

A:

I figure you 's best check this size in the debugger tools of your browser. You can get the data length, as suggested by John Riche, but this is only the character length. The actual byte size of this data alone may vary, depending on the used encoding. And then you got your headers too. 
Unfortunately I think you cannot read this information from Javascript itself.
If you use Chrome, press F12 to open the development tools, and choose 'Network', you get an overview of requests, including AJAX requests. For each request there's a byte size of both the response content and the entire response.
In FireBug you should be able to see similar data.

