aisowe

怎样设置Cookie

因为 Cookie 是服务器保存在浏览器中的一小段信息, 因此这个设置应当是服务器发起的, 设置方法是在Response Header中添加: Set-Cookie字段, 值是多个键值对. 如下:

// Response Header
Set-Cookie: foo=bar; li=lei

 

注意: 

1. Response Header 中可以添加多个Set-Cookie字段;

2. 一个Set-Cookie字段中也可以添加多条Cookie, 并以"分号" +"空格"分隔.

分类:

技术点:

相关文章:

  • 2021-11-17
  • 2021-11-27
  • 2021-12-25
  • 2021-12-26
  • 2022-02-09
  • 2022-02-21
  • 2021-12-29
猜你喜欢
  • 2021-12-19
  • 2021-12-19
  • 2021-12-08
  • 2021-12-04
  • 2022-02-11
  • 2021-12-12
  • 2021-12-03
相关资源
相似解决方案