title: Clearing cookie after sendbeacon on window.unload event in chrome
body: <p>So i have the following requirement when the browser is closed or when tab is closed:</p>
  <ol>
  <li>Send a post request to my server(should be reliable and send request every time).</li>
  <li>After sending the request, delete the cookies using my synchronous function.</li>
  </ol>
  <p>now, i have the following code:</p>
  <pre><code> function deleteCookie(){
     // code to delete the cookie
   }
  
   window.addEventListener('unload', ev =&gt; {
       navigator.sendBeacon(url,body)
       deleteCookie()
  })
  </code></pre>
  <p>What is happening right now is, the browser is deleting the cookies before sending the request.
  I need the cookies in my request. Any help would be appreciated.</p>
  <p>In IE i don't have this issue as I can send synchronous requests in unload event.</p>