in reply to Re^2: parse html for specific things
in thread parse html for specific things
Probably because it is not intended to be read by humans. JSON parsers will have no problem with lack of irrelevant white space, so why bother adding white space?Yes, I fully appreciate that it doesn't matter for parsers. But, still, when I have to write some JSON or some HTML, I usually prefer to insert at least some vertical space (EOLs), because there is almost always a time somewhere in the future when I or another human will need to read the source or change it. My take on this is similar to what I do with Perl or C code: to make it friendly to the human reader. But I certainly understand your point that you may also need to optimize your document's size, especially if it's going to be transmitted zillions of times over a network which may sometimes be slow.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: parse html for specific things
by roboticus (Chancellor) on Dec 18, 2017 at 16:52 UTC | |
by hippo (Archbishop) on Dec 18, 2017 at 17:18 UTC | |
by roboticus (Chancellor) on Dec 18, 2017 at 22:10 UTC |