I was just wondering.
In my PHP CMS application I catch most of generated HTML into buffers and then, at the right spot in the template page, I flush their contents.
Some proxies or browsers might have problems with a very large HTML file on a single line.
For JavaScript for example, tools that minify the code usually add line breaks at specific intervals.
The Closure Compiler intentionally adds line breaks every 500 characters or so. Firewalls and proxies sometimes corrupt or ignore large JavaScript files with very long lines. Adding line breaks every 500 characters prevents this problem. Removing the line breaks has no effect on a script's semantics. The impact on code size is small, and the Compiler optimizes line break placement so that the code size penalty is even smaller when files are gzipped.
UglifyJS does the same:
--max-line-len (default 32K characters) — add a newline after around 32K characters. I’ve seen both FF and Chrome croak when all the code was on a single line of around 670K. Pass –max-line-len 0 to disable this safety feature.