title: How the server side does know that the client browser was closed and so the session will be invalid?
body: <p>I am wondering how session does work?
   If I have:</p>
  
  <pre><code>Session["Mysession"]="1";
  </code></pre>
  
  <p>How the server side does know that the client browser was closed and so the session will be invalid?</p>
  
  <p>How such session is created in the server side? What is the mechanism?</p>