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 list of my cookies in "Parameters" window. And how sites (for example Facebook) identifier users after closing browser (session cookies must expire according to books and tutorials)?
By default, the cookie is destroyed when the current browser window is closed, but it can be made to persist for a length of time after the page is closed. Some cookies are 'session cookies', which means they only exist when your browser is open and are automatically deleted when you close your browser or quit the app.
Nothing. Session will not expire when uses closes the browser. As http is stateless, the server is not seeing what happens on client side.
To set a cookie so it expires at the end of the browsing session, simply OMIT the expiration parameter altogether.
Cookies are of two different types:
Read http://en.wikipedia.org/wiki/HTTP_cookie
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With