How cookies work?

前端 未结 6 1798
北荒
北荒 2020-11-29 04:35

I wanted to know the interactions of a browser (i.e. Firefox ) and a website.

When I submit my user name and password to the login form, what happens? I think that we

6条回答
  •  既然无缘
    2020-11-29 05:13

    It depends, because there are many scenarios and abilities of usage of cookies.

    One of scenarios is:

    1. User submits login form.
    2. Website authorizes the user and set cookie visible in website domain with user name, password (i.e. MD5 hashed) and sometimes other information.
    3. Cookie is sent with each request, which allows website to check if request is came from the authorized user.

    For more details read Wikipedia article about cookies.

提交回复
热议问题