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