Simultaneous HTTP connections in IE, IE memory leaks (unrelated)... some thoughts and links

Two things that scares me off a bit with complex client side Javascript programming and AJAX technology are:

  • The number of possible simultaneous connections in a browser
  • IE browser has memory leaks when doing complex operations

Simultaneous Connections: 

By default a browser supports only up to 2 simultaneous connections as described by Michael Schwartz in this blog entry. It is possible to increase this amount through a registry setting. Good to increase the amount of simultaneous downloads, but not something you can count on in yor application. This means that you should really watch out in implementing multiple separate XmlHttpRequests from your web page. Although I assume that calls are just blocked when the “request queue” is full, and will be executed when a previous request is finished. I thought that applications in Flash could work around that limitation, but as far as I know Flash utilizes the browser HTTP stack, so will probably suffer from the same restrictions (can someone confirm this?).

IE memory leaks:

Something that really “shocked” me a while ago was this weblog post by (again) Michael Schwartz. He describes memory leaks with XmlHttpequests in sites like http://www.start.com. I didn’t hear much about it after that post, until I stumbled over a blog entry by Telerik (the developers of the great WYSIWYG HTML editor). They describe IE memory leaks, and some tips on how to avoid them. They link to this article at http://quirksmode.com with more pointers to information on IE memory leaks.

Lets hope that implementations like Ajax.Net, MagicAjax and Atlas and all the other Ajax libraries work around these issues so we simple developers don’t have to take care of all the quirks that the different browsers will definitly have. This is one of the reasons why Flash looks so interesting: one vendor, so probably the same bugs on all platforms;-)

 

12 Comments

  • Memory leaks with AJAX aren't just an IE problem. Admittedly I don't have any direct experience of AJAX but I was talking to a senior developer at a company that has developed a large AJAX appliction who said their biggest problem is that the browsers were never designed for two or three hours activity without a full page refresh and that both Firefox and IE had terrible memory leaks. I asked him that if he only had to support one browser which one would he choose as having less of a problem. His answer? "Neither!"

  • Solving all the underlying problems and wrapping it in an API is called abstraction. You can do it both in Ajax and in Flash with the only difference being that if the Ajax abstraction leaks you can digg into its bowels and solve it yourself, and if the Flash application bugs you are left at the mercy of your vendor.



    The memory leaks you are talking about concerning events and closures are easily fixed if you use something like Dojo to connect your events. It will handle the cleanup for you.



    And changing registry settings to increase the number of simultaneous connections does not seem like a very good idea as it is prohibited according to HTTP. There are other ways out of it, and doing that kind of stuff will only put more stress on an ailing web.

  • The IE limit of two connections is per hostname. If you load different resources (images, JavaScript, styleshets) from other hostnames, you can have more than 2 simultaneous connections. This approach is also used on the www.microsoft.com. For instance, on the homepage you'll notice that images are loaded from hostnames like i2.microsoft and i3.microsoft.com, although they will have the same IP-address (they're Akamai caching servers).



    When using Atlas, it can batch requests..

  • I am having a same problem in I.E,Fire Fox is working fine. two Iframes and one simple iframe can cause this as well.

    The main point is If the two requests are made and there response is not yet complete then the third request is blocked. It doesnt matter you use AJAX or Iframe.


  • Answer to your question.... I thought that applications in Flash could work around that limitation, but as far as I know Flash utilizes the browser HTTP stack, so will probably suffer from the same restrictions (can someone confirm this?).

    Yes this true. I am trying to see what I can do work around this.

  • -----------------------------------------------------------
    "Have you ever regarded as including additional videos in your website posts to maintain the readers far more entertained? I imply I just study as a result of the whole write-up of yours and it was quite great but because I'm a lot more of a visual learner,I identified that for being far more useful. Just my my concept, Very good good luck "

  • -----------------------------------------------------------
    I am speechless. This can be a excellent blog page and extremely partaking very. Superb work! That is not seriously a lot approaching from an novice writer like me, but it's all I could think right after enjoying your posts. Excellent grammar and vocabulary. Not like other blogs. You genuinely know what you are talking about very. So considerably that you created me want to explore extra. Your weblog has become a stepping stone for me, my buddy. Give thanks to you for your articulate journey. I genuinely enjoyed the 27 posts that We've go through so far.

  • Found your website by accident for the second time today so I imagined I'd take a nearer appear. I've just began generating my own web site and modeling it right after what you've got carried out. I desire mine will likely be as prosperous as yours.

    --------------------------------------------------------------------
    Slavic Languages and Literatures

  • 439877.. Very nice :)

  • 439877.. Outstanding :)

  • Hi there, You've got performed an extraordinary job. I will surely digg it and personally recommend to my buddies. I'm positive they are going to be benefited from this web site.

  • Yes there should realize the reader to RSS my feed to RSS commentary, quite simply

Comments have been disabled for this content.