[英]Should I avoid the usage of the http-equiv=“content-type” meta tag in html?
I see some people recommending putting in the head of all of their html. 我看到有人建议将所有html放在标题中。 Our server is sending a content-type http header, so I dont believe this is needed. 我们的服务器正在发送内容类型的http标头,因此我认为这不是必需的。 Am I correct? 我对么? Are their any reasons to keeping the meta tag? 他们有保留元标记的任何理由吗?
A reason I wish to remove it is because Google mentions that IE8 may suffer in performance if content-type is defined in a meta http-equiv tag rather than in http headers. 我希望删除它的原因是因为Google提到如果在meta http-equiv标签而不是在HTTP标头中定义content-type,IE8的性能可能会受到影响。 https://developers.google.com/speed/docs/best-practices/rendering?hl=it#SpecifyCharsetEarly https://developers.google.com/speed/docs/best-practices/rendering?hl=it#SpecifyCharsetEarly
There's no need to put it there if your server is setting the correct headers. 如果您的服务器设置了正确的标头,则无需将其放置在此处。 The headers are the preferred, standard way of setting the content type. 标头是设置内容类型的首选标准方法。
BTW don't forget to accurately put your charset in the content type too! 顺便说一句,不要忘记也将您的字符集准确地放在内容类型中!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.