title: How to detect Close Tab/ Browser for logout in javascript vue.js with quasar framework
body: <p>I want to call the logout function on the close tab or close the browser only, not on the refresh page.<br>
  I tried with the below example code it doing logout on the close tab perfectly but also doing logout if I refresh the page. <br>
  I want to prevent logout on the refresh page.</p>
  <pre><code> window.addEventListener('beforeunload', this.logout)
  </code></pre>