Reputation: 1709
I am trying to learn more about Google and other sites, and would like to know whether i got this right or not. So here it goes:
When I log into my Google account (or any other site like Twitter or Facebook) then I start a new session. That means that the server knows that I logged in and sets an expiration time for that session. So when I close my browser (and not log out) and my session is not expired yet, then I can open up a new browser window and will be still logged in. Is that correct?
Ok, what I would like to know is, are there any files stored on my computer during this process of logging in? Like cookies? Or are they only stored when I tick the box "stay signed in"?
Upvotes: 3
Views: 2687
Reputation: 30147
In order to let your session "stay alive" even when you close the browser, as far I know, Google use cookies.
There are two type of cookies:
Session cookies and persistent cookies. Session cookies expire when the browser exits or is closed (for browser like firefox you must close the process, i.e. all the windows and all the tabs).
Persistent cookies, on the other hand, are saved into the browser dedicate storage for a limited amount of time (set by the server) and are also sent back to the servers until they're not expired (so the server is able to restore the user's session).
Google in your case, very likely, use persistent cookie.
Read http://en.wikipedia.org/wiki/HTTP_cookie
Update:
Google Chrome starting with version 19 made a breakthrough change in the session cookie handling. In short: in order to improve the user experience the session cookie will not be removed.
Take a look at chrome settings, there is an option: "Continue where I left off". When this option is enabled the session cookies never expire.
Upvotes: 3
Reputation: 39451
Google always stores cookies, even if you don't log in at all. Most websites do. A cookie is simply a way of telling that you're the same person who visited the site half a second ago. Without cookies, there would be no webapp state at all (well obviously there are other ways to maintain state but cookies are the most popular). Anyway, when you log in, the server remembers that the session associated with your cookie is logged in.
Upvotes: 0