title: Vue How to send data to server before leaving page?
body: <p>How do you send data to the server before closing a tab, the browser, or going to another page or reloading the page? I've tried the following, but doesn't work.</p>
  
  <pre><code>ready: function() {
          Vue.util.on(window, 'beforeunload', this.save, false);
      }
  </code></pre>