views:

38

answers:

1

Browsers render content after "enough" data has been received or once data stops flowing in (Content Length reached, for example).

I want to slowly stream data to the browser; to do this, I have to work around this data caching.

For example, instead of sending 40 bytes of JavaScript, I have to send the 40 bytes of JS followed by about 4 KB of spaces in order to get the browser to interpret the script.

This works fine. But I don't remember where I first heard the number "4 KB" and was wondering what the true required amount is per browser.

I could of course write a bunch of tests to find these numbers, but I was curious if anyone has already done this work for me. I am also at a loss for what to ask the Google regarding this.

+3  A: 

If you want to know what response size browsers need before rendering content when you flush the response early, I found these numbers buried in a comment in a post about flushing the document early:

IE: 255 bytes
Safari: 1K
Chrome: 2K

If you're looking into this so that you can implement streaming, you might want to look into how various comet implementations handle this.

Annie
Exactly the kind of information I was looking for.
Frank Krueger