h1

IE7 XMLHttp resending requests?

May 5th, 2006

Tucows used BlogChat earlier this week for the Ask Tucows chat they regularly host for their partners, clients and other interested parties.

After the chat was closed, I noticed that Bryan’s browser continued to resend chat messages. These were repeats of earlier conversation from his browser, and being sent in their original order, although not with exactly the same timed spacing. They were actually coming in as logged http requests from his IP. I quickly got Bryan’s number from whois and called him at his desk. He still had the browser running, but had closed the chat tab immediately after the chat. His browser continued to send these old messages after the tab was closed!

I’ve looked at our code. We recently changed the transport method on the visitor chat client from img/cookie to XMLHttp (with failover to hidden Iframe) to a) avoid cross-domain problems in embedded chat windows and b) be more AJAXY. The code creates a new XMLHttp object each time but then does not explicitly dispose of it once its onLoad has fired. The polling nature of the app means that many of these objects are being created. I’ve yet to
determine whether certain browsers keep them around where others don’t.

My working theory is that IE7′s native browser implementation of XMLHttp (as opposed to IE6′s ActiveX implementation) not only keeps these objects around, but for some reason starts re-firing them later on, for some reason in the order that they were created.

While I’ll definitely look into disposing of the objects once used, I think this behaviour could constitute a pretty nasty bug if your ajax calls do things like “delete record” or “apply charge to account”.

I’m away at The Ajax Experience next week but after that I’ll set up a vm test environment. In the meantime, has anyone had similar experiences with IE7 and XMLHttp?

4 comments to “IE7 XMLHttp resending requests?”

  1. [...] Through working with the IE7 team, we’ve figured out the problem behind the IE7 XMLHttp resend issue I reported a while ago. [...]


  2. [...] Tucows used BlogChat earlier this week for the Ask Tucows chat they regularly host for their partners, clients and other interested parties. After the chat was closed, I noticed that Bryan s browser Read More [...]


  3. [...] brentashley ” Blog Archive ” IE7 XMLHttp resending requests? … chat client from img/cookie to XMLHttp (with failover to hidden Iframe) to a) … The code creates a new XMLHttp object each time but then does not explicitly … [...]


  4. [...] Tucows used BlogChat earlier this week for the Ask Tucows chat they regularly host for their partners, clients and other interested parties. After the chat was closed, I noticed that Bryan s browser Similar Pages [...]