<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>.NET Tips and Tricks &#187; Internet Explorer</title>
	<atom:link href="http://kossovsky.net/index.php/tag/internet-explorer/feed/" rel="self" type="application/rss+xml" />
	<link>http://kossovsky.net</link>
	<description>C# Code Snippets, ASP.NET Code Samples, .NET Tips and Tricks</description>
	<lastBuildDate>Sat, 25 Dec 2010 08:32:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>IE Memory Leak &#8211; jQuery Fix</title>
		<link>http://kossovsky.net/index.php/2009/07/ie-memory-leak-jquery-garbage-collector/</link>
		<comments>http://kossovsky.net/index.php/2009/07/ie-memory-leak-jquery-garbage-collector/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 08:37:12 +0000</pubDate>
		<dc:creator>Xander</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[filter selector]]></category>
		<category><![CDATA[garbage collector]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[html contents]]></category>
		<category><![CDATA[html elements]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[javascript functions]]></category>
		<category><![CDATA[jQuery Plugin]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[memory leak]]></category>
		<category><![CDATA[memory leaks]]></category>
		<category><![CDATA[nyromodal]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[virtual memory]]></category>

		<guid isPermaLink="false">http://kossovsky.net/?p=489</guid>
		<description><![CDATA[I suppose all of you have suffered all those terrible memory leaks in Internet Explorer. Sometimes it&#8217;s bearable, but most of the time it&#8217;s not. I say enough is enough ! A couple of days ago, I had to create some web application with a very rich client side UI. It worked like a charm [...]<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=4.3" /></div><div>Rating: 4.3/<strong>5</strong> (16 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p>I suppose all of you have suffered all those terrible memory leaks in Internet Explorer.<br />
Sometimes it&#8217;s bearable, but most of the time it&#8217;s not. I say enough is enough !</p>
<p><span id="more-489"></span></p>
<p>A couple of days ago, I had to create some web application with a very rich client side UI.<br />
It worked like a charm in Google Chrome, Firefox&#8230; but IE7, after few dozens of nyroModal popups it just went dead. </p>
<p>Most of the styles are gone, JavaScript functions began to throw exceptions till it just stoped working, decided it can&#8217;t tolerate this kind of abuse any more and closed it self without any warning.</p>
<p>The first thing i did is to open Performance Monitor and what I see&#8230; every nyroModal popup i open cost me about 5Mb, so after a few clicks my IE7 virtual memory was about 789Mb. Terrifying, isn&#8217;t it ?</p>
<p><img src="http://kossovsky.net/wp-content/uploads/2009/07/IE7MemoryLeak.gif" alt="IE7 Memory Leak" title="IE7 Memory Leak" width="426" height="130" class="size-full wp-image-490" /></p>
<p>I&#8217;ve searched a bit and found the source of this problem was in one (of many) memory leaks IE7 proudly has &#8211; cleaning memory for removed HTML elements.</p>
<p>And now the fix.</p>
<p>1). Open your jQuery.js and find the next lines of code</p>
<pre class="javascript" name="code">
    jQuery.extend({
        cache: {},
</pre>
<p>and add new function &#8220;discardElement&#8221;</p>
<pre class="javascript" name="code">
    jQuery.extend({
        cache: {},

        discardElement: function(element) {
            var jqGCID = 'jqGarbageCollector';
            var jqGC = document.getElementById(jqGCID);
            if (!jqGC) {
                jqGC = document.createElement('div');
                jqGC.id = jqGCID;
                jqGC.style.display = 'none';
                document.body.appendChild(jqGC);
            }

            // place the element to the Garbage Collector
            // and clear it's HTML contents
            jqGC.appendChild(element);
            jqGC.innerHTML = '';
        },
</pre>
<p>2). Find the next lines of code in the opened jquery.js </p>
<pre class="javascript" name="code">
	remove: function( selector ) {
		if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
			// Prevent memory leaks
			jQuery( "*", this ).add([this]).each(function(){
				jQuery.event.remove(this);
				jQuery.removeData(this);
			});
			if (this.parentNode)
				this.parentNode.removeChild( this );
		}
	},
</pre>
<p>and replace &#8220;this.parentNode.removeChild( this );&#8221;<br />
with &#8220;jQuery.discardElement(this);&#8221;</p>
<pre class="javascript" name="code">
	remove: function( selector ) {
		if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
			// Prevent memory leaks
			jQuery( "*", this ).add([this]).each(function(){
				jQuery.event.remove(this);
				jQuery.removeData(this);
			});
			if (this.parentNode)
				// this.parentNode.removeChild( this );
				jQuery.discardElement(this);
		}
	},
</pre>
<p>That&#8217;s it, now you (and every plugin) can do $(&#8216;element&#8217;).remove() without being worry IE will eat all of your memory.</p>
<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=4.3" /></div><div>Rating: 4.3/<strong>5</strong> (16 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />
<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fkossovsky.net%2Findex.php%2F2009%2F07%2Fie-memory-leak-jquery-garbage-collector%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://kossovsky.net/index.php/2009/07/ie-memory-leak-jquery-garbage-collector/feed/</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>IETester &#8211; Multiple Internet Explorer versions on the same PC</title>
		<link>http://kossovsky.net/index.php/2009/06/ietester-multiple-internet-explorer-versions-on-the-same-pc/</link>
		<comments>http://kossovsky.net/index.php/2009/06/ietester-multiple-internet-explorer-versions-on-the-same-pc/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 20:18:24 +0000</pubDate>
		<dc:creator>Xander</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[browser web]]></category>
		<category><![CDATA[Cross Browser]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[ie5 5]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[internet explorer versions]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[little bugs]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[virtual server]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[web developer]]></category>
		<category><![CDATA[webbrowser]]></category>

		<guid isPermaLink="false">http://kossovsky.net/?p=171</guid>
		<description><![CDATA[IETester is a free WebBrowser that allows you to have the rendering and javascript engines of IE8, IE7 IE 6 and IE5.5 on Vista and XP, as well as the installed IE in the same process. Despite some little bugs IETester is a very nice tool and for my opinion this is a must for [...]<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (5 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-173" title="IETester" src="http://kossovsky.net/wp-content/uploads/2009/06/ietester-0_3.jpg" alt="IETester" width="400" height="112" /></p>
<p>IETester is a<strong> free</strong> WebBrowser that allows you to have the rendering and javascript engines of IE8, IE7 IE 6 and IE5.5 on Vista and XP, as well as the installed IE in the same process.<span id="more-171"></span></p>
<p>Despite some little bugs <a title="IETester" href="http://www.my-debugbar.com/wiki/IETester/HomePage" target="_blank">IETeste</a>r is a very nice tool and for my opinion this is a must for any web developer who makes cross browser web sites and don&#8217;t want to install virtual server for each IE version.</p>
<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (5 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />
<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fkossovsky.net%2Findex.php%2F2009%2F06%2Fietester-multiple-internet-explorer-versions-on-the-same-pc%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://kossovsky.net/index.php/2009/06/ietester-multiple-internet-explorer-versions-on-the-same-pc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CTRL+A Image maker</title>
		<link>http://kossovsky.net/index.php/2009/06/ctrla-image-maker/</link>
		<comments>http://kossovsky.net/index.php/2009/06/ctrla-image-maker/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 21:31:46 +0000</pubDate>
		<dc:creator>Xander</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[c code]]></category>
		<category><![CDATA[c-sharp]]></category>
		<category><![CDATA[CTRL+A]]></category>
		<category><![CDATA[Hidden Image]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[image maker]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://kossovsky.net/?p=7</guid>
		<description><![CDATA[Well, this is not a new technique, but i couldn’t find any decent c# code that makes it work – so i’ve decided to write my own. Coming soon… Rating: 0.0/5 (0 votes cast)<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p>Well, this is not a new technique, but i couldn’t find any decent c# code that makes it work – so i’ve decided to write my own.</p>
<p>Coming soon…</p>
<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />
<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fkossovsky.net%2Findex.php%2F2009%2F06%2Fctrla-image-maker%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://kossovsky.net/index.php/2009/06/ctrla-image-maker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

