为什么 HTTP header 中 Content-Type 这一条目的写法是 charset 在 content 的属性里面?

http-equiv 这个属性对应 HTTP response headers 里面的项目,它也是因此而得名。其初衷是让不能(比如没有权限)设定服务器 header 的站点可以通过它来告知浏览器一些页面内容的相关信息。而 HTTP header 里面,Content-Type 这一条目的写法就是 "text/html; charset=utf-8"。


参见 reference.sitepoint.com
原发布于 https://www.zhihu.com/question/20615748/answer/15651889