如何在HTTP协议中传递Cookie? [英] How are cookies passed in the HTTP protocol?

查看:625
本文介绍了如何在HTTP协议中传递Cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过HTTP协议传递Cookie?

How are cookies passed in the HTTP protocol?

推荐答案

服务器在其响应标头中发送以下内容以设置Cookie

The server sends the following in its response header to set a cookie field.

Set-Cookie: value

如果设置了Cookie,则浏览器会在其请求标头中发送以下内容。

If there is a cookie set, then the browser sends the following in its request header.

Cookie: name = em>值

Cookie:name=value

请参阅 HTTP Cookie 文章,了解更多信息。

See the HTTP Cookie article at Wikipedia for more information.

这篇关于如何在HTTP协议中传递Cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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