title: Chrome window onunload event
body: <p>I'm trying to execute the following code </p>
  
  <pre><code>window.onunload = function () { 
       var sTag = document.createElement('script'); 
       sTag.src = 'mysrc'; 
       document.getElementsByTagName('head')[0].appendChild(sTag); 
       return false; };
  }
  </code></pre>
  
  <p>Itseems to work fine in FF but in chrome I'm getting the download status as cancelled as soon as the unload event is fired. I saw some posts in SO with ajax solutions but I'm executing this script inside a cross domain iframe. Im just trying to log the time for which my api was live in a page per visitor. So, I'm sending some time log information on unload of the page. Is there any work around for the above?</p>