<?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>Matt Refghi&#039;s Blog &#187; javascript</title>
	<atom:link href="http://mattrefghi.com/blog/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattrefghi.com/blog</link>
	<description>Computer Science and other written works</description>
	<lastBuildDate>Sat, 10 Mar 2012 17:58:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Testing Web Performance by Throttling Bandwidth</title>
		<link>http://mattrefghi.com/blog/2010/11/testing-web-performance-by-throttling-bandwidth/</link>
		<comments>http://mattrefghi.com/blog/2010/11/testing-web-performance-by-throttling-bandwidth/#comments</comments>
		<pubDate>Sun, 21 Nov 2010 20:15:01 +0000</pubDate>
		<dc:creator>Matt Refghi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Recommendations]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://mattrefghi.com/wordpress/?p=2100</guid>
		<description><![CDATA[In the past, I often]]></description>
			<content:encoded><![CDATA[<p>In the past, I often found myself wondering how some of my websites would perform when accessed from a low bandwidth connection. Unfortunately, I had no convenient way to test such a scenario, so I usually just forgot about the idea. I recently found myself in a similar scenario at work, and my searches returned a useful tool, <a href="http://www.ngcoders.com/downloads/internet-speed-simulator-proxy-throttler" target="_blank">Speed Simulator</a>, by <a href="http://www.vikaspatial.com/" target="_blank">Vikas Patial</a>:</p>
<blockquote><p>Speed simulator is a simple throttling proxy which allows you to see how your site behaves under different connection speeds. It was written by me to test AJAX/Flash loaders and see how much my time took to load.You can simulate various speeds like that of a modem or a ADSL.A pre delay function is also there to help simulate delays due to DNS , connection establishment etc.</p></blockquote>
<p style="text-align: left;">Here&#8217;s what it looks like:</p>
<p style="text-align: center;"><img class="size-full wp-image-2118 aligncenter" src="http://mattrefghi.com/wordpress/wp-content/uploads/2010/11/SpeedSimUI.png" alt="Screenshot of the Speed Simulator user interface" width="408" height="236" /></p>
<p style="text-align: center;">
<p>It simply acts as a <a href="http://en.wikipedia.org/wiki/Proxy_server" target="_blank">proxy</a>, so all you need to do is point your browsers to access the web through Speed Simulator. You&#8217;ll then be transported back to the good ol&#8217; days where most people had to wait for websites to load.</p>
<p>To do this:</p>
<ol>
<li>Click Start, and search for &#8220;Internet Options&#8221;. Launch it.</li>
<li>Click on the &#8220;Connections&#8221; tab.</li>
<li>Click the &#8220;LAN Settings&#8221; button, found within the &#8220;Local Area Network (LAN) Settings&#8221; section.</li>
<li>Once the &#8220;Local Area Network (LAN) Settings&#8221; dialog appears, locate the &#8220;Proxy Server&#8221; section.</li>
<li>Enable the &#8220;Use a proxy server for your LAN&#8221; checkbox, and enter the following:</li>
</ol>
<ul>
<li>Address: <em>localhost</em></li>
<li>Port: <em>8080 </em>(reflect the port listed in Speed Simulator)</li>
</ul>
<p style="text-align: center;"><img class="size-full wp-image-2104 aligncenter" src="http://mattrefghi.com/wordpress/wp-content/uploads/2010/11/ProxyConfig.png" alt="Local Area Network (LAN) Settings dialog in Windows, with a proxy server configured." width="394" height="345" /></p>
<p>Press OK to save your changes, and then simply click &#8220;Start&#8221; in the Speed Simulator window.</p>
<p>That&#8217;s it &#8211; all you need to do next is launch a browser, the bandwidth should be throttled. I&#8217;ve seen it work with Google Chrome and Internet Explorer. Configuring a proxy in Firefox requires different steps, but should work just as well, once configured.</p>
<p>I can see myself using this tool in the future, and not only for simple performance tests. For example, I can use it to test for possible timing-related flaws in JavaScript code. Definitely a welcome addition to my web development tool set.</p>
<div id='adc_container_2' class='creditsContainer' style='height:48px'>
	<div id='adc_cell_2' class='creditsCell' style='width: 33.333333333333%;height:48px'>
		<span id='adc_avatar_2' style='float: left;display: inline-block'><img id='adc_img_2' src='http://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?s=48&amp;d=mm' alt='Gravatar Photo' class='creditsImage' style='width:48px;height:48px' /></span>
		<span class='creditType' id='adc_type_2' style='line-height:24px'>Reviewed by</span><br />
		<span class='creditName' id='adc_name_2' style='line-height:24px'>Brian Ricard</span>
	</div>
</div><br />
<script type='text/javascript'>var g_obj_all_due_credit_resizer = new all_due_credit_resizer(); if(g_obj_all_due_credit_resizer){g_obj_all_due_credit_resizer.start(2100,3,48);}</script><p><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F11%2Ftesting-web-performance-by-throttling-bandwidth%2F&amp;linkname=Testing%20Web%20Performance%20by%20Throttling%20Bandwidth" title="Digg" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F11%2Ftesting-web-performance-by-throttling-bandwidth%2F&amp;linkname=Testing%20Web%20Performance%20by%20Throttling%20Bandwidth" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F11%2Ftesting-web-performance-by-throttling-bandwidth%2F&amp;linkname=Testing%20Web%20Performance%20by%20Throttling%20Bandwidth" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F11%2Ftesting-web-performance-by-throttling-bandwidth%2F&amp;linkname=Testing%20Web%20Performance%20by%20Throttling%20Bandwidth" title="Slashdot" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://mattrefghi.com/blog/2010/11/testing-web-performance-by-throttling-bandwidth/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="horizontal" data-url="http://mattrefghi.com/blog/2010/11/testing-web-performance-by-throttling-bandwidth/" data-text="Testing Web Performance by Throttling Bandwidth"></a><a class="a2a_button_google_plusone addtoany_special_service" data-href="http://mattrefghi.com/blog/2010/11/testing-web-performance-by-throttling-bandwidth/"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F11%2Ftesting-web-performance-by-throttling-bandwidth%2F&amp;title=Testing%20Web%20Performance%20by%20Throttling%20Bandwidth" id="wpa2a_2"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://mattrefghi.com/blog/2010/11/testing-web-performance-by-throttling-bandwidth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copying the Contents of Windows Dialogs</title>
		<link>http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/</link>
		<comments>http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 17:49:39 +0000</pubDate>
		<dc:creator>Matt Refghi</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[paste]]></category>

		<guid isPermaLink="false">http://www.mattrefghi.com/wordpress/?p=1143</guid>
		<description><![CDATA[As a developer, I very]]></description>
			<content:encoded><![CDATA[<p>As a developer, I very often see error messages &#8211; some of those originate from the products I develop, and I have to report them as bugs. Whenever I get an error message in a dialog, I typically take a screenshot, and add that to the bug base issue. That&#8217;s fine, but it means people can&#8217;t search for that error message in the bug base &#8211; in order to enable that, I&#8217;d usually just manually type out the error message, rather than take a screenshot. That was before. <strong>Today, I&#8217;d</strong><strong> just press </strong><kbd><strong>CTRL</strong></kbd><strong>+</strong><kbd><strong>C</strong></kbd><strong> to copy the error dialog contents</strong>.</p>
<p>That&#8217;s right, whenever you see a dialog in Windows, like this:</p>
<div id="attachment_1147" class="wp-caption aligncenter" style="width: 482px"><a href="http://www.mattrefghi.com/wordpress/wp-content/uploads/2010/01/ErrorDialog.png" rel="lightbox[1143]"><img class="size-full wp-image-1147 " title="A typical Windows error message dialog." src="http://www.mattrefghi.com/wordpress/wp-content/uploads/2010/01/ErrorDialog.png" alt="" width="472" height="127" /></a><p class="wp-caption-text">A typical Windows error message dialog.</p></div>
<p style="text-align: left;">You can press <kbd>CTRL</kbd>+<kbd>C</kbd> to copy, and then open up Notepad, and press <kbd>CTRL</kbd>+<span style="font-family: monospace;">V</span> to paste:</p>
<div id="attachment_1148" class="wp-caption aligncenter" style="width: 519px"><img class="size-full wp-image-1148 " title="The dialog title, contents, and even the button text are saved to the clipboard." src="http://www.mattrefghi.com/wordpress/wp-content/uploads/2010/01/ErrorDialogCopied.png" alt="" width="509" height="205" /><p class="wp-caption-text">The dialog title, contents, and even the button text are saved to the clipboard.</p></div>
<p style="text-align: center;">
<p><strong> </strong></p>
<p>I had <em>no idea </em>this was possible until I read <a href="http://lifehacker.com/268547/copy-error-messages-text-to-the-clipboard" target="_blank">a Lifehacker article</a> explaining it.  Since I&#8217;ve started using it, I&#8217;ve found it very useful in my every day work. Maybe you will too!</p>
<p>Just a note, though &#8211; it doesn&#8217;t seem to work <em>everywhere</em>. For example, JavaScript alert dialogs can&#8217;t be copied in Firefox, but they can in Internet Explorer.</p>
<p><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;linkname=Copying%20the%20Contents%20of%20Windows%20Dialogs" title="Digg" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;linkname=Copying%20the%20Contents%20of%20Windows%20Dialogs" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;linkname=Copying%20the%20Contents%20of%20Windows%20Dialogs" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;linkname=Copying%20the%20Contents%20of%20Windows%20Dialogs" title="Slashdot" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="horizontal" data-url="http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/" data-text="Copying the Contents of Windows Dialogs"></a><a class="a2a_button_google_plusone addtoany_special_service" data-href="http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;title=Copying%20the%20Contents%20of%20Windows%20Dialogs" id="wpa2a_4"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

