Is the charset meta tag required with HTML5?

前端 未结 4 1883
忘了有多久
忘了有多久 2020-12-09 03:07

The W3C \"HTML5 differences from HTML4\" working draft states:

For the HTML syntax, authors are required to declare the character enc

4条回答
  •  粉色の甜心
    2020-12-09 04:04

    According to the Google PageSpeed browser extension, declaring a charset in a meta element "disables IE8's lookahead feature" which apparently forces it to download everything in serial.

    My understanding was that was required for valid HTML5, but that is why I started browsing here.

    That draft of the spec seems pretty clear to me and since I add the HTTP header via .htaccess, I am going to start leaving it out...even though I'm tempted not to, just make IE8 users suffer a bit more.

    Thanks.

    @Jules Mazur do you have any references about those points? Most of what I do is SEO and accessibility is important to me and if that is the case I am more than receptive to leaving the the meta declaration.

提交回复
热议问题