title: Wait/sleep before window.close()
body: <p>I try to set up a simple logoff-page which should close after 3 seconds.</p>
  
  <p>Regarding this  <a href="https://stackoverflow.com/questions/57854/how-can-i-close-a-browser-window-without-receiving-the-do-you-want-to-close-thi">Question</a>  is it possible to wait before that action?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  sleep(3000);
  window.open('', '_self', ''); 
  window.close();
  &lt;/script&gt;
  </code></pre>
  
  <p>With the sleep nothing happens at all.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>The solution of @Sidius works well in IE without a prompt.</p>
  
  <p>Unfortunately Firefox blocks the Script:</p>
  
  <blockquote>
    <p>Scripts can not close any windows that were not opened by the script</p>
  </blockquote>