3 ms·
I'm conflicted on omitting tags to make pages lighter. I'm sensitive to making things lighteight but I really do like the XHTML parser catching dumb errors that
by jraph 7y ago
I'm conflicted on omitting tags to make pages lighter. I'm sensitive to making things lighteight but I really do like the XHTML parser catching dumb errors that would be silent bugs in HTML.
I also like the readability of a document where all closing tags are here. Some tricks can arguably make the code more readable (ommitting head and body) but some tricks require effort to understand if you are not used to them. We write code for human beings first.
Maybe an HTML minimizer could be used if one wants to save bytes?
- eska 7y agoI use XHTML in my own static site generator, together with an external XML minifier library, then validate the output at build time. In my tests XHTML had a significant parsing advantage over HTML, and I didn't need to do any questionable stuff like in the suggestions here.