1. Once I discovered () during the development process, I could directly understand the Session. Is cookies OK?
()Try it, but it was fruitless, and the cookie still exists. The answer is that it is no.
Session exists on the server side and can be controlled by a general program, but cookies exist in an independent computer and cannot be directly removed (physical deleted). However, it can be deleted through the browser. When the browser detects that the cookie expiration time has exceeded the range, the cookie information will no longer be loaded. Significantly the deleted cookie information.
2. In fact, in development, it is very simple to remember the password, that is, to set the expiration time longer. No matter that user doesn't know how to observe this small problem for a long time.
However, after setting the time, can the program read the expiration time?
I tried it. {0001-1-1 0:00:00} is the content returned by the cookie expiration time. On January 1, 1, the time is always 0. I searched for some information online.
When the browser sends cookie information to the server, the validity period information is not included
When the browser sends cookie information to the server, the validity period information is not included. (The Expires property of a cookie always returns a date-time value with a value of 0.)
Now I understand the reason.
()Try it, but it was fruitless, and the cookie still exists. The answer is that it is no.
Session exists on the server side and can be controlled by a general program, but cookies exist in an independent computer and cannot be directly removed (physical deleted). However, it can be deleted through the browser. When the browser detects that the cookie expiration time has exceeded the range, the cookie information will no longer be loaded. Significantly the deleted cookie information.
2. In fact, in development, it is very simple to remember the password, that is, to set the expiration time longer. No matter that user doesn't know how to observe this small problem for a long time.
However, after setting the time, can the program read the expiration time?
I tried it. {0001-1-1 0:00:00} is the content returned by the cookie expiration time. On January 1, 1, the time is always 0. I searched for some information online.
When the browser sends cookie information to the server, the validity period information is not included
When the browser sends cookie information to the server, the validity period information is not included. (The Expires property of a cookie always returns a date-time value with a value of 0.)
Now I understand the reason.