title: how to get result of request leaving website?
body: <p>This is my code for a request when leaving the website: </p>
  
  <pre class="lang-js prettyprint-override"><code>window.onbeforeunload = function() {
      return 'Are you sure you want to leave?'
  };
  </code></pre>
  
  <p>But now I want to check, if the user really leaves the website or stays there. So, is there any way to check the result of the return or to change the code, so that will work?</p>
  
  <p>Thank you for every answer!</p>