title: How to clear local storage on browser close but not refresh?
body: <p>My requirements are:</p>
  
  <ol>
  <li><p>Have to detect browser close event and it should not execute onpage refresh.</p></li>
  <li><p>If code works only on browser close then have to clear localstorage.</p></li>
  <li><p>Already i tried with onbeforeunload but it is executing on browser close event and page refresh event.</p></li>
  <li><p>So my code only works on browser close event not on page refresh (F5 or clicking on refresh symbol).</p></li>
  </ol>