You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless there is comprehensive proof that nothing breaks and there is a general reduction in gzip sizes across a representative sample, I'm reluctant for any code changes.
But when the option to use the HTML5 doctype is enabled, then that case isn't valid, is it? Or maybe I'm missing something in regards to XHTML since I've never had the need to use such thing.
FWIW I can confirm that in my use case, for minified static (GZIPPed) HTML pages, using "doctype" lowercase does save bytes in the compressed/transferred result. If I wanted XHTML output then all sorts of other optimisations would have to go away too, such as dropping optional closing tags and element* quoting.
@XhmikosR they mentioned something along the lines of XHTML5
@DamonHD thanks for the observation and the point about optional tags
I was worried about those enterprisy (read: Java) libraries getting upset about conformance issues, but you guys have successfully convinced me otherwise.
Activity
alexlamsl commentedon Jun 3, 2017
Does the current behaviour cause failure in any major browsers?
ngyikp commentedon Jun 3, 2017
No
It's just a compression suggestion to shave a few bytes when gzipped
alexlamsl commentedon Jun 3, 2017
Unless there is comprehensive proof that nothing breaks and there is a general reduction in gzip sizes across a representative sample, I'm reluctant for any code changes.
XhmikosR commentedon Jul 7, 2018
@alexlamsl: you should revisit this. Lowecase
doctypedoes save a few bytes and doesn't cause any issues.alexlamsl commentedon Jul 8, 2018
@XhmikosR I shall take your word on compatibility 😉
Will put together a PR after my belated 🎂 party.
XhmikosR commentedon Jul 8, 2018
Hey, it's no my word, it's the community's word ;) You can never beat such extended testing.
alexlamsl commentedon Jul 8, 2018
Speaking of community...
https://stackoverflow.com/questions/7020961/uppercase-or-lowercase-doctype
According to the discussions above, if we go for uppercase, everything works - otherwise something might break.
XhmikosR commentedon Jul 8, 2018
But when the option to use the HTML5 doctype is enabled, then that case isn't valid, is it? Or maybe I'm missing something in regards to XHTML since I've never had the need to use such thing.
DamonHD commentedon Jul 8, 2018
FWIW I can confirm that in my use case, for minified static (GZIPPed) HTML pages, using "doctype" lowercase does save bytes in the compressed/transferred result. If I wanted XHTML output then all sorts of other optimisations would have to go away too, such as dropping optional closing tags and element* quoting.
[Edit: * I meant attribute value, sorry!]
alexlamsl commentedon Jul 8, 2018
@XhmikosR they mentioned something along the lines of XHTML5
@DamonHD thanks for the observation and the point about optional tags
I was worried about those enterprisy (read: Java) libraries getting upset about conformance issues, but you guys have successfully convinced me otherwise.
Will put that PR together when I get home.
use lower case in `useShortDoctype`
use lower case in `useShortDoctype` (#944)