具有属性 http-equiv 的元标记如何在幕后工作?

How does meta tag with attribute http-equiv work under the hood?

我听说 html 中的元标记可用于指定响应键值对,如果是这样,它是如何工作的?响应 html 页面的服务器如何在 html 解析器解析它之前理解元标记?

元标记示例:

<meta http-equiv="set-cookie" content="userid=xyz; expires=Wednesday, 08-Aug-00 23:59:59 GMT;" />

I heard that the meta tag in html can be used to specify response key-value pairs

在非常有限的条件下。

if so, how does it work under the hood? How does the server responding with html page understands the meta tag before the html parser parses it?

没有。它由浏览器解释。

Example of the meta tag

cookie 不是 http-equiv 的有效值。我想你的意思是 set-cookiespecification 中被标记为 不合格 所以你不应该使用它。

也不是有效的属性分隔字符。您需要 "'.