title: what can i put in beforeUnload?
body: <p>I would like to have an animation effect which starts when people leave a page. </p>
  
  <p>I use this currently:</p>
  
  <pre><code>window.onbeforeunload = function (){
      alert("test");
      console.log("test");
      sliderIntervalId = setInterval('SlideDown()',1);
  }
  </code></pre>
  
  <p>While the "test" is indeed logged to the console, the neither the function slideDown nor the test alert is produced...</p>
  
  <p>Is this normal behavior? can we use the beforeunload function only for backend purposes? </p>
  
  <p>P.S. I'm testing on chrome, that's why I had to use onbeforeUnload i.s.o onUnLoad which seems not to be supported by Chrome?</p>