Hacker News .hnnew | past | comments | ask | show | jobs | submit | RogerE's commentslogin

You can guess, but browsers are quite picky about this header --- guess any amount too low and the download is truncated. Guess too high, and the browser will wait for an amount of time just to be sure the server isn't going to send more data.


I wonder if this would actually be useful to support in HTTP? (An `Estimated-Content-Length` header or similar, only valid with `Connection: close`.)


It would be better to include progress estimation information as a chunked encoding extension. This allows much better progress reporting.


Note that it is possible to "always guess long" and pad out with null bytes... this usually works (many file format parsers aren't too picky). However, this is more of a practical work-around than a recommended solution!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: