-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lowercase doctype
.
#2389
Lowercase doctype
.
#2389
Conversation
It has the same effect but compresses slightly better.
I'm aware of that hence this patch. There's no reason to use the uppercased |
let's see what they think @nodejs/website |
Thanks for your contribution @XhmikosR , I think there's no need to change it to lowercase. |
If we have places where it is already lowercase, I'd be in favor of this for consistency although I'd want a lint rule to enforce it going forward. |
I don't mind not landing this, although I really don't see any gain from using an uppercase doctype. For reference https://github.com/h5bp/html5-boilerplate/blob/master/dist/index.html#L1 And even google is using the lowercase doctype nowadays. |
@nodejs/website Anyone feel like this is a generally-accepted best practice and therefore something we should do? |
h5bp/html5-boilerplate#1522 (comment) about the small giz gain. Personally, I say just lowercase it and be done with it. It's a leftover from the old days. |
Is doctype even necessary any more in a modern browser? MDN says
Given that no current browser except maybe Edge feature such a "quirks mode", is it even necessary? |
I'd keep it for backwards compatibility. This patch proposes a simple change only. |
Yeah I guess the spec saying "A DOCTYPE is a required preamble." should be honored. Anyways, I'm fine with lowercasing it to shave off a few bytes. |
Can you reopen the PR or should I make a new one? I'm not sure if re-opening will work since I had deleted the branch. |
|
@pierreneter: the spec does not say that. |
So, why we need lowercase? |
Because it has the same effect plus it compresses slightly better. See the previous links/discussion. |
I don't think so; so, I will give some ideas on why Uppercase is better.
|
Anyway, I think this is discussed a lot more than it should be. Feel free to drop it or merge it. |
XHTML compatibility (number 1 above) is a non-issue. We do not and should not conform to XHTML. Even the link provided to argue that As for the guide/lint thing (number 2 above): The linked style guide does not require capitalization. It uses capitalization in its example. It does not say "Don't use lowercase." Other sections have "not recommended" examples. That one does not. However, what that guide DOES say is to use HTML5 (where lowercase AFAICT, the only persuasive reason for doing this is that it will (probably) shave a small number of bytes off some or all transfers. And the only persuasive reasons for not doing it are that it is unnecessary churn and that the bytes saved are insignificant. For me, it's a coin toss. I can go either way. |
@Trott Ok, I agree with you. @XhmikosR can you create PRs for all repositories which use |
What does it have to do what others do? I simply decided to contribute to a project which I use daily, here. Like I said, we are discussing this a lot more than we should. For me it's standard to use lowercase |
I'm going to close this because it is indeed low-stakes. @XhmikosR Note that there is a website-redesign initiative (no idea how far along they are), so for longevity of the change, you may want to see about implementing over there instead anyway. Not sure where they do their work these days (or if it's stalled? I hope not....) /ping @nodejs/website-redesign (I know they also manage the nodejs.dev repo/site but I think that's kind of a stop-gap measure and not a model for the new site.) |
@Trott for what it's worth, the core docs do use a lowercase https://github.com/nodejs/node/blob/775048d54c6f190cbc8c0b55c0b53d2ba9d4d028/doc/template.html#L1 |
@Trott can you reopen this? IMO this totally makes sense especially given that a lowercase doctype is used in core. |
I think it's just personal experience preferences... and we can't argue with something one for 100% sure, so we need to just vote. For me personally uppercase is more comfortable, but I had an experience with HTML pages optimization and used lowercase to reduce page size. @nodejs/website-redesign @nodejs/website Let's vote on this post:
|
My point here is that this is how it is in core. https://github.com/nodejs/node/blob/master/doc/template.html#L1 |
The Reopen button is disabled, probably because the branch was deleted. |
Alright I'll make a new PR.
…On Sun, Sep 29, 2019, 20:39 Rich Trott ***@***.***> wrote:
@Trott <https://github.com/Trott> can you reopen this?
The Reopen button is disabled, probably because the branch was deleted.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2389?email_source=notifications&email_token=AACVLNJBAC7RXSVYXEULBJDQMDR5DA5CNFSM4ILCIZA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD732M3Y#issuecomment-536323695>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACVLNLLOEVPWBPAG2FWLKTQMDR5DANCNFSM4ILCIZAQ>
.
|
Let's wait 48 hours for everyone able to vote |
You should also uppercase it upstream then. Hence why lowercasing it here
is the best solution IMO
…On Sun, Sep 29, 2019, 21:28 Alexandr Tovmach ***@***.***> wrote:
Let's wait 48 hours for everyone able to vote
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2389?email_source=notifications&email_token=AACVLNMCPAR2KJKJWI6K4LTQMDXURA5CNFSM4ILCIZA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD733QII#issuecomment-536328225>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACVLNN57KP4ZC46CMOFHJ3QMDXURANCNFSM4ILCIZAQ>
.
|
It has the same effect but compresses slightly better.