3 ms·
> I'm pretty sure you can remove these: <link rel="icon" href="/favicon.ico"> The presence of the SVG favicon, with the same rel, may throw the default-finding
by chrismorgan 6y ago
> I'm pretty sure you can remove these: <link rel="icon" href="/favicon.ico">
The presence of the SVG favicon, with the same rel, may throw the default-finding off. I haven’t tested it, but I would expect various older user agents that don’t support SVG to fall over if you omit the favicon.ico link once you’ve provided the SVG link.
> By default servers add the charset as an http header.
This is not true: it depends entirely on the server configuration. Maybe one serves `content-type: text/html`, maybe another serves `content-type: text/html; charset=utf-8`. The reason people recommend <meta charset="utf-8"> is so that you don’t depend on server configuration that the authors of the HTML commonly can’t control, and which may not always be possible: specifically, what happens if someone saves your HTML page locally?
> And since utf-8 is the only valid charset for HTML5 it shouldn't be the default.
UTF-8 is the only valid charset for HTML now, but that doesn’t mean it’s the only supported charset. See https://html.spec.whatwg.org/#determining-the-character-encoding https://html.spec.whatwg.org/#determining-the-character-enco.... The default varies by locale and even user configuration (see the table in step 9). If the default was changed to UTF-8, many non-English old documents would break. Maybe eventually the default will be changed anyway, at least where the short <!doctype html> doctype is used.
- shadowfaxRodeo 6y agoThat's a good point about the favicon mix. I really want to get a difinitve answer to all this. I'll do some tests when I have time. I guess that should read most servers? I'm not much of a backend dev, but every default I've seen has included the charset in the headers. I realize I'm blowing against the wind on this one! On a site by site basis it seems that you really can get rid of it. I've only tested my own sites offline in various browsers and they work fine without the meta tag. One example of a site that doesn't use it is YouTube, and I figured that can't be an accident.