Now, I understand that it’s bad practice to delay a page close, and that there are better ways to handle that kind of stuff, but just for future reference, is there a way to delay the page closing? Something like
window.onunload = unload();
function unload()
{
setTimeout("self.close()", 1000)
}
Thanks!
If you really need (ie. ready to resort to semi-hacks) to delay the page closing without showing a confirmation dialog, etc, you can do something like the following:
The caveats are obvious: it will not always work and you cannot delay for too long. That being said, if you are really interested in this, you can probably get results of over 95% (really depends on the server response time).