apankrat/nullboard

Bump meta charset to before license

Opened this issue · 0 comments

According to MDN,

<meta> elements which declare a character encoding must be located entirely within the first 1024 bytes of the document.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset

In addition, you should always specify the characterset as early as possible within your HTML's <head> block (within the first kilobyte) …

https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Writing_style_guide/Code_style_guide/HTML#document_characterset

At one point I believe one of these pages noted that browsers essentially have to parse the document enough to find the meta tag with the charset attribute, then stop, throw it out and start over parsing with the specified charset, so the earlier it shows up the better. I don't know if that specific reason is still applicable. I haven't been able to find it again searching MDN's docs now.