Why cookies dont expire after closing browser?

前端 未结 8 683
一整个雨季
一整个雨季 2020-12-14 22:31

In books and tutorials related with Web-programming written that cookies expire when user close browser. So I cant understand why after closing browser(Opera) I can see the

8条回答
  •  Happy的楠姐
    2020-12-14 23:23

    Every cookie have an expiry time ,if you have not set a particular value , it will accept the default value .A cookie will expire only after this expiry time , no matter whether you are closing browser or not . You can kill a cookie by setting negative value to as expiry time

    In php you have a good tutorial here http://php.net/manual/en/function.setcookie.php

提交回复
热议问题