D
Darko
Hi,
I'm making an application in which I use resident ajax request. That
means, I have a server-side application that collects ajax requests
and responds only when information available. I did so because I
didn't want to bomb the server with ajax requests every 5 seconds
(although even that is too much because it is critical to display the
right information as soon as it comes, to the user). So I create an
ajax request object, send a request, and then the onreadystatechange
event won't happen until the server responds. The server, however,
just collects sockets and when it is informed about a change (by
another server process), it sends it to all interested clients. It
works.
However, in Explorer I have an issue. It works as well as with
Firefox, sends the request, waits for it, and everything was fine
until I discovered that when I try to go to another page inside the
site, it just won't go! Refreshing, navigating to another page on the
site - nothing. Going from the page to, say, Google, works, but
requesting another information from my server just won't work. It
seems that the problem are these open connections. In firefox, they
just get killed, and everything is fine, but explorer won't do that.
Even when I close the page, and try to reopen it - that won't work
neither. I could only reopen the page by closing all Explorer tabs and
windows, then reopening it.
What could I do to solve the problem? I tried to register the onUnload
event, in which I kill all the open connections (not many of them
there are, usually up to 2-3, in real use it will be probably just
one), but that won't work neither - the onUnload is never called,
because it seems to wait for the connections to close for that too).
Anybody having had experience with resident ajax connections, anybody
having had similar problems? Thank you
I'm making an application in which I use resident ajax request. That
means, I have a server-side application that collects ajax requests
and responds only when information available. I did so because I
didn't want to bomb the server with ajax requests every 5 seconds
(although even that is too much because it is critical to display the
right information as soon as it comes, to the user). So I create an
ajax request object, send a request, and then the onreadystatechange
event won't happen until the server responds. The server, however,
just collects sockets and when it is informed about a change (by
another server process), it sends it to all interested clients. It
works.
However, in Explorer I have an issue. It works as well as with
Firefox, sends the request, waits for it, and everything was fine
until I discovered that when I try to go to another page inside the
site, it just won't go! Refreshing, navigating to another page on the
site - nothing. Going from the page to, say, Google, works, but
requesting another information from my server just won't work. It
seems that the problem are these open connections. In firefox, they
just get killed, and everything is fine, but explorer won't do that.
Even when I close the page, and try to reopen it - that won't work
neither. I could only reopen the page by closing all Explorer tabs and
windows, then reopening it.
What could I do to solve the problem? I tried to register the onUnload
event, in which I kill all the open connections (not many of them
there are, usually up to 2-3, in real use it will be probably just
one), but that won't work neither - the onUnload is never called,
because it seems to wait for the connections to close for that too).
Anybody having had experience with resident ajax connections, anybody
having had similar problems? Thank you