Content-Length header versus chunked encoding

Use Content-Length, definitely. The server utilization from this will be almost nonexistent and the benefit to your users will be large. For dynamic content, it’s also quite simple to add compressed response support (gzip). That requires output buffering, which in turn gives you the content length. (not practical with file downloads or already compressed content … Read more

Using “transfer-encoding: chunked”, how much data must be sent before browsers start rendering it?

I did some research on this today with an url endpoint accepting letting me configure chunk sizes and intervals. Mac: text/html: image/jpeg: curl 7.24.0 4096 bytes Firefox 17 1024 bytes 1886 bytes Chrome 26.0.1410.65 1024 bytes 1885 bytes Chrome 29.0.1524.0 8 bytes 1885 bytes Safari 6.0.4 (8536.29.13) 1024 bytes whole file Windows XP: IE8 256 … Read more

tech