The genesis of this rant is that a colleague and I have just spent a couple of days diagnosing and fixing memory leaks (sorry, "pseudo-leaks"," according to Microsoft, which presumably means that the memory explosion we were seeing wasn't actually real) caused by awful, awful garbage collection in Internet Explorer.

The icing on the cake was finding this article: Understanding and Solving Internet Explorer Leak Patterns. The markworthy text is this:

Pseudo-leaks almost always appear on the same page during dynamic scripting operations and should rarely be visible after navigation away from the page to a blank page.
In other words, Microsoft Word doesn't leak memory either. All you have to do is close it, open it again and miraculously all the memory that it allocated and failed to release (but that somehow fails to meet the definition of "leaked") is released.

The whole point of Internet Exploder 8 was to build an AJAX-friendly browser. The subtext went along the lines of, "Well, all those AJAX-heavy sites like GMail, Google Maps, Hotmail etc don't perform well under IE7 and we're losing browser market share, so let's make a browser that is AJAX-friendly. But, at the same time, let's make developers require people to navigate away from that application before any of its memory is released."

We've just spent days diagnosing as many of the various ways that IE leaks memory (ways, incidentally, with which none of the other browsers seem to have problems), patching the jQuery core to cope with its idiocy and writing our own DOM garbage collection handlers to deal with it. The jQuery and GWT discussion forums reveal that these guys are having just as much pain, and for similar reasons.

To the IE development team: Please, please, please, guys, fix your sodding .removeChild method and everything that has anything to do with it. And don't talk to me about setting .innerHTML properties either until you have a browser that doesn't seg-fault when I do that to a table element, or when I manually break the relationship between a node and its parent. Finally, at least have the courage to confess that your browser does leak memory in these scenarios rather than some pathetic attempt at explaining why a leak isn't a leak. Grr!!

If you want to cringe, grab the sIEve tool (see Memory leak detector for Internet Explorer for a link) and point it at http://msdn.microsoft.com. Navigate around a bit and then have a look at the number of orphan DOM nodes. Consider how many full-page reloads MSDN causes, and compare this to your own AJAX application. Weep.