Tim Streater
4/6/2015 1:23:00 PM
In article <3049656.CVpVeAz9R9@PointedEars.de>, Thomas 'PointedEars'
Lahn <PointedEars@web.de> wrote:
>I do not see your point. Why exactly can that not be done in a user-
>friendly, non-blocking, asychronous way?
Termination actions. If the user closes the window in my app, the
unbeforeunload handler runs. This is my last chance to tidy up, and I
need to be able to run a PHP script and, crucially, to have it
complete, before the handler exits.
Making an async XMLHttpRequest will mean that the handler will complete
right away and my PHP script will be aborted by apache. So I make a
sync request and all behaves as required.
--
"The problem with defending the purity of the English language is that English
is about as pure as a cribhouse whore. We don't just borrow words; on occasion,
English has pursued other languages down alleyways to beat them unconscious
and rifle their pockets for new vocabulary." -- James Nicoll, rasfw