title: Why do sessions expire after closing the browser window?
body: <p>According to <a href="https://stackoverflow.com/questions/454635/where-are-session-variables-stored">Where are $_SESSION variables stored?</a>: "<em>Usually the session-id is stored in a cookie, but it can also be appended to urls"</em>. Once I read that, I asked myseld: so, why is it said that the session-id is deleted when closing the browsers window if it is stored in a cookie? </p>
  
  <p>Then, after Googling a little bit more about it, I found that there are two different types of cookies: session cookies and persistent cookies. </p>
  
  <p>I guess that the session-id is stored in a session cookie, but: beyond the name evidence, <strong>why is a session stored in a session cookie and not in a persistent cookie? What is the need of creating a new session-id every time the browser is opened? Why don't re-use it?</strong></p>