meta http-equiv - 它是作为HTTP标头的一部分发送的,还是客户端解析主体标签的主体? [英] meta http-equiv - is it sent as part of an HTTP header, or does the client parse the body for meta tags?

查看:146
本文介绍了meta http-equiv - 它是作为HTTP标头的一部分发送的,还是客户端解析主体标签的主体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

维基百科似乎暗示网页中的< meta http-equiv> 会导致服务器更新响应标头,但这对我来说听起来不对因为服务器必须在发送之前解析文档。那会很难看。

Wikipedia seems to imply that <meta http-equiv> in a web page causes the server to update the response header, but that doesn't sound right to me since the server would have to parse the document before it's sent. That would be fugly.

但是,当< 时,我很难找到 的内容。使用meta http-equiv> 。在我看来,如果发现< meta http-equiv> 标记与标题冲突,客户端会解析页面并破坏在HTTP标头中发送的任何内容。

But, I'm having trouble finding much on what does happen when when <meta http-equiv> is used. It seems likely to me that the client parses the page and clobbers anything that was sent in the HTTP header if a <meta http-equiv> tag is found conflicts with the header.

是否有人知道实际流程是什么和/或对于我可能在哪里找到有关此主题的更多信息有任何想法?

Does anybody know what the actual process is and/or have any ideas about where I might find more information about this topic?

谢谢!

Greg

Thanks!
Greg

推荐答案

服务器应该解析HTML,提取< meta> 并以真实HTTP标头发送。你可以猜到,这并没有在任何主要的网络服务器上实现。

Servers were supposed to parse HTML, extract <meta> and send it in real HTTP headers. As you can guess, this isn't implemented in any major web server.

所以目前客户< meta http-equiv> 。但是,它与HTTP标头的等效无关。它仅支持特定值的短白名单 ,其中大部分是为了与传统内容兼容。

So currently clients read <meta http-equiv>. However, it's not any close to being an "equivalent" of HTTP headers. It only supports a short whitelist of specific values, most of which are for compatibility with legacy content.

这篇关于meta http-equiv - 它是作为HTTP标头的一部分发送的,还是客户端解析主体标签的主体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆