title: Session or cookie confusion
body: <p>I've seen in some websites that user signed in into their accounts and then closed the browser.</p>
  
  <p>After closed and re-opened the browser and their accounts are still signed in.</p>
  
  <p>But some websites, cannot do like that.</p>
  
  <p>I'm confused that it's considered session or cookie?</p>
  
  <p>If I want my website to be signed in like that, do I have to set <code>session.setMaxInactiveInterval()</code> or <code>cookie.setMaxAge()</code>?</p>