<?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>Dare to Dream? &#187; Web 2.0</title>
	<atom:link href="http://www.makuchaku.in/blog/category/web-20/feed" rel="self" type="application/rss+xml" />
	<link>http://www.makuchaku.in/blog</link>
	<description>Good judgment comes from experience; Experience comes from bad judgment.</description>
	<lastBuildDate>Sun, 02 Oct 2011 19:29:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Why jQuery.proxy rocks my world!</title>
		<link>http://www.makuchaku.in/blog/why-jquery-proxy-rocks-my-world</link>
		<comments>http://www.makuchaku.in/blog/why-jquery-proxy-rocks-my-world#comments</comments>
		<pubDate>Wed, 27 Apr 2011 08:39:08 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[AdoMado]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[My Learnings]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=1041</guid>
		<description><![CDATA[Its been very recent that I&#8217;m seriously looking into Javascript &#8211; and trust me, there is no dearth of stuff that can be achieved with purely client side code (HTML/CSS/JS). With the modern browsers churning out best of the breed in JS environments (both headed &#38; headless), everything is going to come to a browser [...]


Related posts:<ol><li><a href='http://www.makuchaku.in/blog/kickass-mcv-for-your-javascript-apps' rel='bookmark' title='Kickass MCV for your Javascript Apps'>Kickass MCV for your Javascript Apps</a> <small>Very recently, I had an opportunity to work on a...</small></li>
<li><a href='http://www.makuchaku.in/blog/how-to-commission-developer-machines-in-an-agile-way' rel='bookmark' title='How to commission developer machines in an agile way?'>How to commission developer machines in an agile way?</a> <small>During the past year &#8211; working at AdoMado, I&#8217;ve seen myself...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/why-jquery-proxy-rocks-my-world&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p><img style="float: left; margin: 5px;" src="http://jonraasch.com/blog/images/jquery-logo.gif" alt="" width="168" height="146" />Its been very recent that I&#8217;m seriously looking into Javascript &#8211; and trust me, there is no dearth of stuff that can be achieved with purely client side code (HTML/CSS/JS). With the modern browsers churning out best of the breed in JS environments (both headed &amp; headless), everything is going to come to a browser near you! Its just a matter of time!</p>
<p>Anyways, on more subtle issues, while writing a purely client side JS app using <a href="http://documentcloud.github.com/backbone">Backbone.js</a> &amp; <a href="http://jquerymobile.com/">jQuery Mobile</a> I came across <a href="http://api.jquery.com/jQuery.proxy/">jQuery.proxy</a> method &#8211; something that I&#8217;ve really started using almost everywhere.. The method is so useful that sometimes I wonder &#8211; why jQuery did not implement it in callback mechanism by default.</p>
<p>A quick overview about the problem&#8230;</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> FBNotificationWatcher = <span class="kw2">new</span> JS.<span class="kw2">Class</span><span class="br0">&#40;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; initialize : <span class="kw2">function</span><span class="br0">&#40;</span>timeout<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">url</span> = <span class="st0">&quot;http://foo/return/json&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">getNotifications</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; <span class="co1">// initiate the first fetch</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; getNotifications : <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; $.<span class="me1">ajax</span><span class="br0">&#40;</span><span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; <span class="co1">// do your ajax call</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; url : <span class="kw1">this</span>.<span class="me1">url</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; success : <span class="kw1">this</span>.<span class="me1">processNotifications</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span>,</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; processNotifications : <span class="kw2">function</span><span class="br0">&#40;</span>rawNotificationData<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// process notifications&#8230; AND</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; setTimeout<span class="br0">&#40;</span>jQuery.<span class="me1">proxy</span><span class="br0">&#40;</span><span class="kw1">this</span>.<span class="me1">getNotifications</span>, <span class="kw1">this</span><span class="br0">&#41;</span>, <span class="kw1">this</span>.<span class="me1">timeout</span><span class="br0">&#41;</span>; <span class="co1">// start all over again&#8230;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>When a new object of FBNotificationWatcher is created, all goes well. this.getNotifications gets the JSON &amp; this.processNotifications processes it. However, when setTimeout&#8217;s occurs and this.getNotifications is called again, the context of &#8220;this&#8221; is set to the &#8220;window&#8221; object. And because of this, the code breaks in this.getNotifications method.</p>
<p>Now this is very frustrating &#8211; as you just lost the object you were operating within.</p>
<p>Solution? jQuery.proxy comes to rescue!</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"> &nbsp;processNotifications : <span class="kw2">function</span><span class="br0">&#40;</span>rawNotificationData<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// process notifications&#8230;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; setTimeout<span class="br0">&#40;</span>jQuery.<span class="me1">proxy</span><span class="br0">&#40;</span><span class="kw1">this</span>.<span class="me1">getNotifications</span>, <span class="kw1">this</span><span class="br0">&#41;</span>, <span class="kw1">this</span>.<span class="me1">timeout</span><span class="br0">&#41;</span>; <span class="co1">// start all over again&#8230;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>If we setup the setTimeout call like this, jQuery will guarantee that the context of &#8220;this&#8221; when this.getNotifications gets executed, will always be set to the original FBNotificationWatcher object which had setup the timer. The second argument to jQuery.proxy defines the context you want to get back when the setTimeout callback gets executed.</p>
<p>This concept can be used anywhere you want your callbacks to retain their context.</p>
<p>Read more about the method at <a href="http://api.jquery.com/jQuery.proxy/">jQuery API docs</a>.</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/why-jquery-proxy-rocks-my-world&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>Related posts:<ol><li><a href='http://www.makuchaku.in/blog/kickass-mcv-for-your-javascript-apps' rel='bookmark' title='Kickass MCV for your Javascript Apps'>Kickass MCV for your Javascript Apps</a> <small>Very recently, I had an opportunity to work on a...</small></li>
<li><a href='http://www.makuchaku.in/blog/how-to-commission-developer-machines-in-an-agile-way' rel='bookmark' title='How to commission developer machines in an agile way?'>How to commission developer machines in an agile way?</a> <small>During the past year &#8211; working at AdoMado, I&#8217;ve seen myself...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/why-jquery-proxy-rocks-my-world/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Faster HTML and CSS &#8211; My Learnings!</title>
		<link>http://www.makuchaku.in/blog/faster-html-and-css-my-learnings</link>
		<comments>http://www.makuchaku.in/blog/faster-html-and-css-my-learnings#comments</comments>
		<pubDate>Thu, 12 Aug 2010 15:33:37 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[for-adomado]]></category>
		<category><![CDATA[My Learnings]]></category>
		<category><![CDATA[Startups]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=955</guid>
		<description><![CDATA[Faster HTML and CSS: Layout Engine Internals for Web Developers (@GoogleTechTalks) I think I never cared about these &#8211; but the way David Baron from Mozilla describes these, I think I will now. The points he was making started seeming so crucial that I jotted them down as if taking notes &#8211; something I never [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/faster-html-and-css-my-learnings&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p><a href="http://www.youtube.com/watch?v=a2_6bGNZ7bA"><img class="alignnone size-full wp-image-957" title="Faster HTML and CSS" src="http://www.makuchaku.in/blog/wp-content/uploads/2010/08/screenshot_003.png" alt="" width="640" height="357" /></a><a href="http://www.youtube.com/watch?v=a2_6bGNZ7bA"><br />
Faster HTML and CSS: Layout Engine Internals for Web Developers</a> (@GoogleTechTalks)</p>
<p>I think I never cared about these &#8211; but the way <a href="http://dbaron.org/" target="_new">David Baron</a> from Mozilla describes these, I think I will now.<br />
The points he was making started seeming so crucial that I jotted them down as if taking notes &#8211; something I never did with previous videos.</p>
<p>The things which I picked up from this video are&#8230;</p>
<p>From fetching the DOM over the wire to displaying it, following steps take place in order&#8230;<br />
<strong>(1) Compute =&gt; (2) Compute Style =&gt; (3) Construct the DOM frame =&gt; (4) Layout =&gt; (5) Paint</strong></p>
<p>The further Left (towards (1)) you push the browser&#8217;s rendering engine via your DOM/JS/CSS, the slower the browser would get.</p>
<p>Hence&#8230;</p>
<p>Use as specific CSS tags as possible. The more generic tag, the higher performance hit while searching the DOM. For example, a &#8220;#some-id {}&#8221; is way way faster than &#8220;body &gt; div p {}&#8221; &#8211; as in the second tag, a larger portion of DOM is parsed to check which elements are affected by the selector. You push the browser to start from stage (2).</p>
<p>&#8220;:hover&#8221; style hits the browser pretty badly &#8211; as it pushes the browser back to stage (2). Coupled with the above mentioned CSS selectors problem, it can lead to real slow computation. Use it with CSS selectors which are very very specific in nature.</p>
<p>Programmatic scrolling of tags (some of which might have overflow property) via javascript &#8211; as that does not causes re-computation of style (stage 2). While if you do it with CSS magic, you push your browser back to stage (2).</p>
<p>Mozilla&#8217;s rendering tree, while building itself &#8211; does not takes any element with with CSS property &#8220;display:none&#8221; into account &#8211; it just skips it. So when this property is flipped, it triggers a full re-computation of the tree &#8211; which is expensive. However if we use the style &#8220;visibility:hidden&#8221; &#8211; the rendering tree picks up the related element while building itself. Hence when visibility is flipped, its much faster as there is no re-calculation of the rendering tree.</p>
<p>An old one &#8211; when javascripts are being downloaded, the browser stops itself from any other processing and waits for the script to download and execute (as script can modify the DOM anyhow it likes). During this time, the precious time is lost &#8211; which could have been used in downloading other content &#8211; like images, DOM, CSS, etc. Hence &#8211; keep the javascripts as further in the DOM as possible. Use caching is possible.</p>
<p>Learn more about speeding up your website at &#8211; <a href="http://developer.yahoo.com/performance/rules.html" target="_blank">Yahoo&#8217;s best practices (YSlow stuff)</a> &#8211; some of which we regularly follow at <a href="http://adomado.com" target="_blank">AdoMado.com</a></p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/faster-html-and-css-my-learnings&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/faster-html-and-css-my-learnings/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why being filtered for adult content?</title>
		<link>http://www.makuchaku.in/blog/why-being-filtered-for-adult-content</link>
		<comments>http://www.makuchaku.in/blog/why-being-filtered-for-adult-content#comments</comments>
		<pubDate>Wed, 28 Apr 2010 06:07:46 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[AdoMado]]></category>
		<category><![CDATA[Startups]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=877</guid>
		<description><![CDATA[Ever since we implemented content filtering mechanisms at AdoMado, our own site was being blocked &#8211; and this made me heck curious &#8211; why?? Today morning, using Rubular (which is an excellent online regex tool) &#8211; I discovered the culprit. And it couldn&#8217;t have been more hilarious ) Fixing this&#8230; ) PS &#8211; a valid [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/why-being-filtered-for-adult-content&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p>Ever since we implemented content filtering mechanisms at <a href="http://adomado.com" target="_blank">AdoMado</a>, our own site was being blocked &#8211; and this made me heck curious &#8211; why??</p>
<p>Today morning, using <a href="http://rubular.com/" target="_blank">Rubular</a> (which is an excellent online regex tool) &#8211; I discovered the culprit.<br />
And it couldn&#8217;t have been more hilarious <img src='http://www.makuchaku.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p><a href="http://adomado.com"><img class="alignnone size-full wp-image-878" title="content filtering" src="http://www.makuchaku.in/blog/wp-content/uploads/2010/04/screenshot_003.png" alt="" width="559" height="378" /></a></p>
<p>Fixing this&#8230; <img src='http://www.makuchaku.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p>PS &#8211; a valid bug.</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/why-being-filtered-for-adult-content&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/why-being-filtered-for-adult-content/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Programmer Happiness &#8211; onroad to Rails3</title>
		<link>http://www.makuchaku.in/blog/programmer-happiness-onroad-to-rails3</link>
		<comments>http://www.makuchaku.in/blog/programmer-happiness-onroad-to-rails3#comments</comments>
		<pubDate>Thu, 08 Oct 2009 14:25:50 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=795</guid>
		<description><![CDATA[Medium: www.vimeo.com Link: www.vimeo.com Rails 3 Update by Yehuda Katz from Wind City Rails 2009 You just can&#8217;t ignore his style of explaining things! No related posts. Related posts brought to you by Yet Another Related Posts Plugin.


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/programmer-happiness-onroad-to-rails3&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p><object type="application/x-shockwave-flash" width="400" height="300" data="http://www.vimeo.com/moogaloop.swf?clip_id=6703956&amp;server=vimeo.com"><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=6703956&amp;server=vimeo.com" /><param name="quality" value="high" />Medium: www.vimeo.com</object>
<br />Link: <a href="http://www.vimeo.com/6703956">www.vimeo.com</a></p>
<p><a href="http://vimeo.com/6703956">Rails 3 Update by Yehuda Katz</a> from <a href="http://windycityrails.org/videos">Wind City Rails 2009</a></p>
<p>You just can&#8217;t ignore his style of explaining things! <img src='http://www.makuchaku.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/programmer-happiness-onroad-to-rails3&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/programmer-happiness-onroad-to-rails3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An interesting problem to solve when migrating wordpress blog to a new URL</title>
		<link>http://www.makuchaku.in/blog/an-interesting-problem-to-solve-when-migrating-wordpress-blog-to-a-new-url</link>
		<comments>http://www.makuchaku.in/blog/an-interesting-problem-to-solve-when-migrating-wordpress-blog-to-a-new-url#comments</comments>
		<pubDate>Thu, 08 Oct 2009 00:05:58 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=790</guid>
		<description><![CDATA[Problem Scenario I migrated my blog from makuchaku.info to makuchaku.in &#8211; and wanted everyone who was linking to my &#8220;.info&#8221; domain, automagically gets linked to my &#8220;.in&#8221; domain. Ofcourse, I cannot change all the possible places from where my .info blog is linked. Challenges I want &#8220;.in/&#8221; to be served when &#8220;.info/&#8221; is cliked I [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/an-interesting-problem-to-solve-when-migrating-wordpress-blog-to-a-new-url&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p><span style="text-decoration: underline;"><strong>Problem Scenario</strong></span><br />
I migrated my blog from makuchaku.info to makuchaku.in &#8211; and wanted everyone who was linking to my &#8220;.info&#8221; domain, automagically gets linked to my &#8220;.in&#8221; domain. Ofcourse, I cannot change all the possible places from where my .info blog is  linked.</p>
<p><span style="text-decoration: underline;"><strong>Challenges</strong></span></p>
<ol>
<li>I want &#8220;.in/&#8221; to be served when &#8220;.info/&#8221; is cliked</li>
<li>I want &#8220;.in/blog/this-is-a-post&#8221; to be served when &#8220;.info/blog/this-is-a-post&#8221; is clicked.</li>
</ol>
<p>Ofcourse, Challenge 1 is very east and straight forward. Just put up a redirection at .info domain and you&#8217;r done. Challenge 2 is interesting.</p>
<p><span style="text-decoration: underline;"><strong>Solution</strong></span><br />
Goto your theme editor (old wordpress blog) and edit the template for which you want to setup redirection. For me, it was all posts and all pages. Next, insert this javascript code at the top of template code&#8230;</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&lt;script type=<span class="st0">&quot;text/javascript&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Redirecting makuchaku.info to makuchaku.in</span></div>
</li>
<li class="li1">
<div class="de1">document.<span class="me1">location</span> = document.<span class="me1">location</span>.<span class="me1">href</span>.<span class="me1">replace</span><span class="br0">&#40;</span><span class="re0">/makuchaku\.<span class="me1">info</span>/</span>, <span class="st0">&quot;makuchaku.in&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&lt;/script&gt;</div>
</li>
</ol>
</div>
<p>Thats it. Now whenever you&#8217;ll hit http://makuchaku.info/blog/why-makuchaku &#8211; you will be redirected to http://makuchaku.in/blog/why-makuchaku &#8211; sweet!</p>
<p><span style="text-decoration: underline;"><strong>Assumptions</strong></span><br />
This solution assumes that your new blog is a mirror replica of your old blog.</p>
<p>Please Digg this post if it helped. Thanks.</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/an-interesting-problem-to-solve-when-migrating-wordpress-blog-to-a-new-url&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/an-interesting-problem-to-solve-when-migrating-wordpress-blog-to-a-new-url/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OMG! Chrome-4.0 is nearly 59% and 76% faster than Firefox-3.7a1pre on my T61 (Ubuntu Jaunty)</title>
		<link>http://www.makuchaku.in/blog/oh-boy-google-chrome-is-nearly-59-to-76-percent-faster-than-firefox-on-my-t61-running-ubuntu-jaunty</link>
		<comments>http://www.makuchaku.in/blog/oh-boy-google-chrome-is-nearly-59-to-76-percent-faster-than-firefox-on-my-t61-running-ubuntu-jaunty#comments</comments>
		<pubDate>Sat, 03 Oct 2009 03:45:32 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[A strong urge to blog...]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[browser wars]]></category>
		<category><![CDATA[chrome vs firefox]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=782</guid>
		<description><![CDATA[Okay, to start off &#8211; I really wanted Firefox to come on the top&#8230; I&#8217;ve been a dedicated firefox user ever since and simply love the product. The fact that it has addons for any conceivable functionality &#8211; makes it r0ck even more! However, to my surprise Google&#8217;s Chrome beats it hands down when it [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/oh-boy-google-chrome-is-nearly-59-to-76-percent-faster-than-firefox-on-my-t61-running-ubuntu-jaunty&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p>Okay, to start off &#8211; I really wanted Firefox to come on the top&#8230; I&#8217;ve been a dedicated firefox user ever since and simply love the product. The fact that it has addons for any conceivable functionality &#8211; makes it r0ck even more!</p>
<p>However, to my surprise Google&#8217;s Chrome beats it hands down when it comes to speed of the javascript engine each of the browser deploys. Google has V8 tucked under Chrome&#8217;s (v4.0.213.1) belt, while my shiny new (nightly updated) Mozilla Firefox Minefield 3.7a1pre has TraceMonkey.</p>
<p>So why am I this sad today? Well&#8230; check this out&#8230;</p>
<p><a href="http://farm4.static.flickr.com/3510/3976232322_bc7eb4e7ce_o.png" target="_blank"><img style="border: 0px initial initial;" src="http://farm4.static.flickr.com/3510/3976232322_64b37fd52c.jpg" alt="Chrome-4.0 vs Firefox-3.7a1pre Peacekeeper JS test" width="500" height="313" /></a><br />
Peacekeeper JS test &#8211; Chrome was nearly 59% faster here!</p>
<p><a href="http://farm4.static.flickr.com/3460/3976232530_02707f81ce_o.png" target="_blank"><img style="border: 0px initial initial;" src="http://farm4.static.flickr.com/3460/3976232530_30702c53b4.jpg" alt="" width="500" height="313" /></a><br />
SunSpider test &#8211; Chrome was almost 76% faster</p>
<p><a href="http://farm4.static.flickr.com/3450/3975471457_530395aec5_o.png" target="_blank"><img style="border: 0px initial initial;" src="http://farm4.static.flickr.com/3450/3975471457_e2ec586452.jpg" alt="" width="500" height="424" /></a><br />
Chrome vs Firefox &#8211; SunSpider test, merged view.</p>
<p>I purposely ran the tests in side-by-side browser windows, launching Firefox tests just about a second before the Chrome&#8217;s tests &#8211; and to my surprise, I could actually (visually) see Chrome finishing faster &#8211; it was that fast!<br />
Afterall&#8230; 59% or 76% actually does seems a pretty huge boost, whatever functionality it might be in.</p>
<p>Here are by browser versions&#8230; (both are stock builds as provided by repositories/online).</p>
<p><img style="border: 0px initial initial;" src="http://farm3.static.flickr.com/2625/3975498101_14b280348b_m.jpg" alt="" /> and  <img style="border: 0px initial initial;" src="http://farm3.static.flickr.com/2441/3975497999_b0f71b273f_m.jpg" alt="" /></p>
<p>Well&#8230; to me, this is healthy competition. Talk about the times when Chrome wasn&#8217;t there, Firefox used to make IE look timid. Come Chrome and now Firefox is doing the catch-up. Whoever wins, we &#8211; the end users &#8211; get the best of all the worlds.</p>
<p>That is like &#8211; have your cake &amp; eat it too <img src='http://www.makuchaku.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>However, I seriously hope that by the time Firefox 4.0 launches, its javascript engine is at par with Google Chrome&#8217;s.<br />
And by the time Google Chrome matures, I wish it should start sporting the same plethora of addons as does Firefox.</p>
<p>From UI&#8217;s perspective, Chrome also packs an extra bit of punch, which I really like and would like to blog about. But thats for a later post.</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/oh-boy-google-chrome-is-nearly-59-to-76-percent-faster-than-firefox-on-my-t61-running-ubuntu-jaunty&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/oh-boy-google-chrome-is-nearly-59-to-76-percent-faster-than-firefox-on-my-t61-running-ubuntu-jaunty/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

