Article From:https://segmentfault.com/q/1010000011706064
Question:

cookieIs the expiry time in browser or server processed?

I see in some cases that setting the time to none and then being asked out is a once-for-all solution?

Answer 0:

cookiesOverdue is browser behavior.
cookiesInternal information expiration is server behavior.
Do not exclude some simple design, expire with cookies instead of information expired.

Answer 1:

The browser side uses cookie, wants the server side to be able to use session

Answer 2:

Browser processing, if the browser found out of date, will not bring cookie requests.
sessionIs the server side processing.

Answer 3:

cookieThere will be an expiration date in the browser, which carries cookies every time it interacts with the server. Browsers will judge the expired cookie according to its expiration, and when it expires, it will not carry the cookie, instead, it will carry the cookie every time it interacts with the server.

Answer 4:

cookie It’s a way of browser caching.

Browser Javascript can use setCookies () to set caching.
Server-side PHP can use setCookies () in response to requests for browsers to write cookies, such as entering a Web site for the first time (the server generates session)

cookies It is on the HTTP request, if cookies is too common to cause the transmission problem.
cookies Expired, equivalent to the browser does not exist this cache.

Answer 5:

1.cookieIs stored in the browser, different browser cache location is not the same.
2.The expiration date can be set up in the browser, and the Baidu will have a lot of operations.
3.php、JavaThese background scripts can set the expiration date of cookie and the contents of cookie.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *