title: How session works with Weblogic 12 c - Closing browser seems to invalidate the session or the cookie
body: <p>In our weblogic java ee application the <code>&lt;cookie-max-age-secs&gt;</code> param is set to -1 (not expire)</p>
  
  <p>The weblogic <code>&lt;timeout-sec&gt;</code>  param is set to 1800 sec (30 mins)</p>
  
  <ol>
  <li><p>The user logs in and then closes the browser (X close).  </p></li>
  <li><p>The user reopen the browser (after a few secs) and and clicks on the
  previous address.</p></li>
  </ol>
  
  <p><strong>Expected behavior:</strong> The browser sends the cookie (which is not expired) and Weblogic recognizes the cookie ID, which is still associated with a session and <strong>lets the user automatically log in in the application</strong>.</p>
  
  <p><strong>Actual behavior:</strong> The user is prompted with the login screen and has to re-login.</p>
  
  <p>It seems like the browser invalidates the cookie during the browser (X close) and doesn't send it to the application. </p>
  
  <p><strong>Note:</strong> Clear browser cache on browser close is NOT checked. Also we don't destroy the session on browser close (nothing fancy like that)</p>
  
  <p><strong>How is this possible? I'm I missing something here?</strong></p>
  
  <p>To make things even more harder: If you are in developer mode (F12) and you're capturing the requests (Network tab) when you close (x close) and reopen <strong>You are automatically logged in.</strong></p>
  
  <p>Same exact test but different behavior. How can it be?</p>
  
  <p>Thanks in advance.</p>