I try to set up a simple logoff-page which should close after 3 seconds.
Regarding this Question is it possible to wait before that action?
<script type="text/javascript">
sleep(3000);
window.open('', '_self', '');
window.close();
</script>
With the sleep nothing happens at all.
Edit:
The solution of @Sidius works well in IE without a prompt.
Unfortunately Firefox blocks the Script:
Scripts can not close any windows that were not opened by the script