IE 6 on windows 2000 hangs on ajax

This problem took me a few days to sort out.  We just started using Ajax in our application and everything was running fine, loading fast and being totally awesome (because its Ajax , and I heart Ajax).  I couldn’t figure it out, every browser and every O/S this was working fine, there was just one customer using IE6 with windows 2000.  The problem was the Ajax call was hanging, for a really long time.  At first I thought the Ajax wasn’t firing at all, but with out live http headers for IE6, there wasn’t any way I could confirm this.

So after about 5 minutes of sitting there pulling my hair out…..the ajax returned a result and the next part of the process ran.   Sooo….what the hell?!?!  A few days of googling, trying different things, asking other people in the development team, and finally praying (all religions), I came across a blog post that explained that IE6 doesn’t handle closed connections very well.  We had this line in our javascript:

xh.setRequestHeader(“Connection”, “close”);

We now had to change our code to only include this if the browser was not IE6.  I wasn’t sure what performance hit this would have or what side affects it would have, but we’ve been running this for a few years and haven’t seen any difference with performance or had any problems.  If anyone else has a better understanding of why IE6 behaves like this, please leave me a comment!!

About Campo

A Coffee fueled software developer from Brisbane, Australia.
This entry was posted in Coding, JavaScript. Bookmark the permalink.

2 Responses to IE 6 on windows 2000 hangs on ajax

  1. Purna says:

    Hi, Did you find the reason why it is behaving like that? I am also facing the same kind of issue.

  2. Campo says:

    Hey Purna,

    I tried to find the original blog post where I found this info out, but I couldn’t find it. I never found out why it was behaving like this. If you find out further details please leave a comment.

    Cheers

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>