cookie

https://www.nczonline.net/blog/2009/05/05/http-cookies-explained/

 

==========================================================

Cookie

small files of information that a web server generates and sends to a web browser. 

key/value pairs used by websites to store state information on the browser. 

 

cookie 流程

1, 访问

      GET /index.html HTTP/1.1
      Host: www.example.com

2, 返回

      HTTP/1.1 200 OK
      Content-type: text/html
      Set-Cookie: foo=10
      Set-Cookie: bar=20; Expires=Fri, 30 Sep 2011 11:48:00 GMT
      ... rest  of the response

3, 后续访问

     GET /spec.html HTTP/1.1
     Host: www.example.com
     
Cookie: foo=10; bar=20
     
Accept: */*


SESSIONS:

Server side cookies

==========================================================

posted @ 2018-07-23 14:11  qqisnow2021  阅读(193)  评论(0编辑  收藏  举报