title: JQuery delete cookie when I close a tab browser
body: <p>I need to delete a cookie when the a tab is closed, searching internet I found this:</p>
  
  <pre><code>$(window).unload(function() {
     $.cookies.del('myCookie');
  });
  </code></pre>
  
  <p>This solution is not working, the cookie persist while the browser is running.  there are more ways to achieve the deletion? I'm using the jquery-cookie plugin.</p>