I have a web page where I want to make sure that an image HTTP request is
successfully made before the page unloads. The request is made by setting
the image element's SRC property to the desired URL.
When I put the SRC property change in either an "onbeforeunload" or
"onunload" event handler, the HTTP request is not received by our server as
much as 75% of the time.
I thought of setting a flag using an "onload" handler for the image element,
to tell me when the HTTP request had completed, and then waiting for that
flag in the "onbeforeunload" or "onunload" document event handlers. But
that doesn't work because Internet Explorer only processes one event at a
time.
Can anyone think of a reliable strategy to make sure that an HTTP request is
definitely sent off before leaving the page?
thx
--
Robert Oschler
"Let the web hear you, add your voice to your web site in minutes!"
-- http://audiodirect.spiderchase.com/
(For a limited time, free voiceover with every sign-up, use this link
instead)
-- http://audio.spiderchase.com/
(A song - are you blue?)
-- http://bluedreams.spiderchase.com/