4 ms·
I have a particular fondness for well-formatted html that I can read via 'view source' - in contrast to the div-overloaded soup that I usually encounter. Period
by oneeyedpigeon 5y ago
I have a particular fondness for well-formatted html that I can read via 'view source' - in contrast to the div-overloaded soup that I usually encounter. Periodically, I toy with automated formatting for html until I remember that it's essentially impossible - two html sources can have a single space character difference and simultaneously produce the same output and different output, depending on an external CSS file. This kind of stuff is tricky.
- deleted 5y ago[deleted]
- ameliaquining 5y agoI'm confused, don't the browser dev tools do exactly this? That seems better than sending pretty-printed HTML on the wire, which is a bunch of unnecessary bytes that users have to pay for.
- oneeyedpigeon 5y agoThe browser dev tools display something very different to the source of the page - it's a live view of the document, for a start.
- ameliaquining 5y agoThat's addressed easily enough: disable JavaScript, so that the document can't change.
- oneeyedpigeon 5y agoUnless I haven't discovered the method, it's also a LOT harder to search the DOM for a given string using the dev tools than it is via source.
- ameliaquining 5y agoIn Chrome, you just Ctrl+F on the Elements tab and then start typing.