<?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>Suraj&#039;s blog &#187; Web Application</title>
	<atom:link href="http://www.surajshrestha.com.np/category/web-application/feed" rel="self" type="application/rss+xml" />
	<link>http://www.surajshrestha.com.np</link>
	<description>imagination more important than knowledge</description>
	<lastBuildDate>Sun, 08 Aug 2010 23:20:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Difference between Response.Redirect() and Server.Transfer() in ASP.Net</title>
		<link>http://www.surajshrestha.com.np/web-application/difference-between-responseredirect-and-servertransfer-in-aspnet.html</link>
		<comments>http://www.surajshrestha.com.np/web-application/difference-between-responseredirect-and-servertransfer-in-aspnet.html#comments</comments>
		<pubDate>Sat, 09 May 2009 04:32:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Application]]></category>
		<category><![CDATA[Fiddler]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[HTTP Request and Respond]]></category>
		<category><![CDATA[Packet Sniffer]]></category>

		<guid isPermaLink="false">http://www.surajshrestha.com.np/?p=156</guid>
		<description><![CDATA[Response.Redirect() and Server.Transfer() both bring the contents from new location (specified as parameter) in web server to the client (browser). However, there are some key differences between these two commands. ]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">Response.Redirect() and Server.Transfer() both bring the contents from new location (specified as parameter) in web server to the client (browser). However, there are some key differences between these two commands. The main difference is that, Redirect() forces the browser to redirect to new location whereas Transfer() makes server to transfer to new location. The point here is, who does the work, it is either client or server. I am going to deal the difference in terms of the HTTP Request generated and HTTP Response received.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">Steps involved in Response.Redirect()</span></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;" lang="EN-US"><span style="mso-list: Ignore;"><span style="font-family: Calibri; font-size: small;">1.</span><span style="font: 7pt &quot;Times New Roman&quot;;">       </span></span></span><span lang="EN-US"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>Client (browser) sends a POST or GET request to the web server with details of new web location to be redirected.</span></span></span></p>
<p class="MsoListParagraphCxSpLast" style="text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;" lang="EN-US"><span style="mso-list: Ignore;"><span style="font-family: Calibri; font-size: small;">2.</span><span style="font: 7pt &quot;Times New Roman&quot;;">       </span></span></span><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">Server checks the new location and if the location is found, it will respond back with 302 Found message. The response message format is like shown below. The message is catched by packet sniffing software called fiddler2.</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">HTTP/1.1 302 Found</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">Server: ASP.NET Development Server/9.0.0.0</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">Date: Fri, 08 May 2009 13:49:28 GMT</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">X-AspNet-Version: 2.0.50727</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">Location: /StateDemoApp/StatusPage.aspx</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">Set-Cookie: tempCookie=6; path=/</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">Set-Cookie: permCookie=0; expires=Fri, 08-May-2009 13:51:28 GMT; path=/</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">Cache-Control: private</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">Content-Type: text/html; charset=utf-8</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">Content-Length: 150</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">Connection: Close</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;"> </span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">&lt;html&gt;&lt;head&gt;&lt;title&gt;Object moved&lt;/title&gt;&lt;/head&gt;&lt;body&gt;</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">&lt;h2&gt;Object moved to &lt;a href=&#8221;%2fStateDemoApp%2fStatusPage.aspx&#8221;&gt;here&lt;/a&gt;.&lt;/h2&gt;</span></span></p>
<p class="MsoNoSpacing" style="margin: 0in 0in 0pt 1in;"><span style="font-size: 9pt;" lang="EN-US"><span style="font-family: Calibri;">&lt;/body&gt;&lt;/html&gt;</span></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;" lang="EN-US"><span style="mso-list: Ignore;"><span style="font-family: Calibri; font-size: small;">3.</span><span style="font: 7pt &quot;Times New Roman&quot;;">       </span></span></span><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">The client knows that this message is not for display and it is ok to redirect to new location.</span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;" lang="EN-US"><span style="mso-list: Ignore;"><span style="font-family: Calibri; font-size: small;">4.</span><span style="font: 7pt &quot;Times New Roman&quot;;">       </span></span></span><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">Then, client generates a new GET HTTP Request, requesting contents from new location.</span></span></p>
<p class="MsoListParagraphCxSpLast" style="text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;" lang="EN-US"><span style="mso-list: Ignore;"><span style="font-family: Calibri; font-size: small;">5.</span><span style="font: 7pt &quot;Times New Roman&quot;;">       </span></span></span><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">The server then serves it as a brand new request. It does not remember the client as it is follow up of previous Response.Redirect(). In fact, no need to remember.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">So, in Response.Redirect(), two round trips to the server are involved. In Response.Redirect(), we cannot pass on the form variable. Also, we cannot preserve those variables for reuse. In this method, the control is completely transferred to new page. However, the execution of current page can still be continued.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">In Server.Tranfer() method, the transfer is done by server. In involves only one round trip to server. The server finds out the new location and if it ok, it serves the content. The new content from new location is served as the part of the originating application, i.e. the URL address remains same and not changed to new address unlike in Redirect() method. So, this method has got one major disadvantage that, if somebody wants to bookmark the new address, he or she will not be able to do so, as only one address is visible in address bar.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.surajshrestha.com.np/web-application/difference-between-responseredirect-and-servertransfer-in-aspnet.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Difference between refreshing a webpage and just hitting Enter in address bar</title>
		<link>http://www.surajshrestha.com.np/web-application/difference-between-refreshing-a-webpage-and-just-hitting-enter-in-address-bar.html</link>
		<comments>http://www.surajshrestha.com.np/web-application/difference-between-refreshing-a-webpage-and-just-hitting-enter-in-address-bar.html#comments</comments>
		<pubDate>Fri, 08 May 2009 05:21:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Application]]></category>
		<category><![CDATA[Fiddler]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[HTTP Request and Respond]]></category>
		<category><![CDATA[IE Facts]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Packet Sniffer]]></category>

		<guid isPermaLink="false">http://www.surajshrestha.com.np/?p=147</guid>
		<description><![CDATA[Let’s say that, you have loaded a webpage in Internet Explorer and some images are not loaded. Now, you may either refresh the webpage by pressing F5 (or clicking Refresh) or you may hit Enter in address bar to reload the page. Are these actions similar? No. But, for a novice user, it may seem [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">Let’s say that, you have loaded a webpage in Internet Explorer and some images are not loaded. Now, you may either refresh the webpage by pressing F5 (or clicking Refresh) or you may hit Enter in address bar to reload the page. Are these actions similar? No. But, for a novice user, it may seem similar. In fact they are same if the last action was sending HTTP request using GET method. But if, last action was using POST method, then they behave differently, although results may be same. I am going to analyze the difference in these actions in this post.</span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">Pressing F5 is a complete refresh. It resends the last HTTP Request to the web server completely. That means, if the last HTTP Request was using POST method, it will submit all the form variables again. So, the server will think as new request and process it accordingly. This is a very important thing to be taken care of, while doing online financial transactions. In fact, Internet Explorer and almost all browsers (including Mozilla Firefox and Chrome) warns about the resending the data again. Internet Explorer displays following warning.</span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt 0.5in"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">“To display the webpage again, Internet Explorer needs to resend the information you’ve previously submitted. If you were making a purchase, you should click Cancel to avoid a duplicate transaction. Otherwise, click Retry to display the webpage again.”</span></span> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt 0.5in"><img class="aligncenter" title="Refresh webpage warning" src="http://farm4.static.flickr.com/3386/3512348768_aff1348623.jpg?v=0" alt="" width="445" height="227" /></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">You can check what data is actually sent to the web server through packet sniffers like Fiddler. It will display the HTTP Request sent to server. The request will include HTTP method, protocol, headers and contents. </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"> <img class="aligncenter" title="Fiddler" src="http://farm4.static.flickr.com/3302/3512348790_78e75a0357.jpg?v=0" alt="" width="500" height="281" /></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span lang="EN-US"><span style="font-size: small;"><span style="font-family: Calibri;">However, if you just press Enter in the address bar, you are safer. It is because, the browser sends the request now by using ‘GET’ method for ‘POST’ method also. As we know, the ‘GET’ method does not send the form data. So, the web server will think that it is not a new request. If server somehow figures out the state of this GET request from cookies and other header information, it serves the page again. In fact, in Internet Explorer 8, if all the data is already loaded in the window, and if you pressed Enter in address bar, it won’t generate and send any requests. Instead, it displays what it has stored in memory. But if you copy the link to new tab of IE8, it will generate new GET request as described above. <span style="mso-spacerun: yes"> </span></span></span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span lang="EN-US"><span style="font-family: Calibri; font-size: small;">Finally, one major difference you must have noticed, i.e., if you are logged into hotmail account, refreshing the window is slower that just pressing the Enter in address bar.</span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt 0.5in"> </p>
<p> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt 0.5in"> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.surajshrestha.com.np/web-application/difference-between-refreshing-a-webpage-and-just-hitting-enter-in-address-bar.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Twitter is Over Capacity</title>
		<link>http://www.surajshrestha.com.np/web-application/twitter-is-over-capacity.html</link>
		<comments>http://www.surajshrestha.com.np/web-application/twitter-is-over-capacity.html#comments</comments>
		<pubDate>Tue, 07 Apr 2009 23:13:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech News]]></category>
		<category><![CDATA[Web Application]]></category>
		<category><![CDATA[Alexa]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.surajshrestha.com.np/?p=112</guid>
		<description><![CDATA[It has been weeks since Internet is buzzed with news of selling of Twitter. Google and other large companies are bidding for it. However, Twitter denies these rumours in its blog blog.twitter.com and says that it is instead of thinking of expanding Twitter. Whatever is the truth, these rumours has helped to gather much traffic in [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style="font-family: Calibri; font-size: small;">It has been weeks since Internet is buzzed with news of selling of Twitter. Google and other large companies are bidding for it. However, Twitter denies these rumours in its blog blog.twitter.com and says that it is instead of thinking of expanding Twitter. Whatever is the truth, these rumours has helped to gather much traffic in Twitter this May. Notice the sharp increase in traffic of Twitter.com after the rumour begun. I have included traffic report of Twitter.com from Alexa.com below.</span></p>
<p><img class="size-full wp-image-113 alignnone" style="border: 1px solid black;" title="twitter-alexa-rank-2009-march" src="http://www.surajshrestha.com.np/wp-content/uploads/2009/04/twitter-alexa-2009-march.jpg" alt="twitter-alexa-rank-2009-march" width="549" height="447" /></p>
<p><span style="font-size: small;">Twitter is now ranked 56 in Alexa Top 500 Global Sites list of Alexa.com. Also, it always lies in Hot Urls list of Alexa.com. Due to sudden growth of traffic, Twitter is overloaded and shows following screen below, saying that </span></p>
<p class="MsoNoSpacing" style="MARGIN: 0in 0in 0pt"><span style="font-size: small;"><span style="mso-tab-count: 1"> </span>Twitter is Over Capacity</span></p>
<p class="MsoNoSpacing" style="MARGIN: 0in 0in 0pt"><span style="font-size: small;"><span style="mso-tab-count: 1"> </span>Too many tweets! Please wait a moment and try again.</span></p>
<p class="MsoNoSpacing" style="MARGIN: 0in 0in 0pt">
<p><span style="font-size: small;"> </span></p>
<p class="MsoNoSpacing" style="MARGIN: 0in 0in 0pt"><img class="size-full wp-image-114 alignleft" title="Twitter is Over Capacity" src="http://www.surajshrestha.com.np/wp-content/uploads/2009/04/twitter-over-capacity.jpg" alt="twitter-over-capacity" width="591" height="435" /></p>
<p><span style="font-family: Calibri; font-size: small;">We hope Twitter will address this issue also very soon in coming future.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.surajshrestha.com.np/web-application/twitter-is-over-capacity.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tag based or Folder based Web Applications? Which do you prefer?</title>
		<link>http://www.surajshrestha.com.np/web-application/tag-based-or-folder-based.html</link>
		<comments>http://www.surajshrestha.com.np/web-application/tag-based-or-folder-based.html#comments</comments>
		<pubDate>Sat, 04 Apr 2009 00:33:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Application]]></category>
		<category><![CDATA[Delicious]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[GMail]]></category>
		<category><![CDATA[Hotmail]]></category>
		<category><![CDATA[Picasa]]></category>
		<category><![CDATA[Yahoo Bookmarks]]></category>

		<guid isPermaLink="false">http://www.surajshrestha.com.np/?p=64</guid>
		<description><![CDATA[Tags here mean some sort of label or comment given to an item like email, picture or blog-post. These are notations which help to find out those items from a heap. On the other hand, Folder here mean category or some sort of classification of those items. So, which one do you prefer most?
Let’s begin [...]]]></description>
			<content:encoded><![CDATA[<p>Tags here mean some sort of label or comment given to an item like email, picture or blog-post. These are notations which help to find out those items from a heap. On the other hand, Folder here mean category or some sort of classification of those items. So, which one do you prefer most?</p>
<p>Let’s begin with an example – Hotmail and Gmail. In Hotmail, we can create folders and allocate emails to those folders. But, we can allocate an email to only one folder. However in Gmail, a single email can be labelled or tagged with multiple labels. The Gmail idea seems great when we cannot categorize an email into particular one category. But it has consequences. If same email is labelled with two labels, it will increase count in both labels, which may not be ok for all. In other many tag-based systems, users need to type tags manually. It is irritating. A simple typing mistake will lead to creation of new tag. Hotmail has another advantage. In Hotmail, we can drag an email to required folders in sidebar. However, this is not the case in Gmail. Dragging same email to multiple labels seems confusing. So, we have to mark same email multiple times with labels. If an email has multiple labels and we remove one label accidently, it accepts easily. But, we may not remember the label name to label it again. In case of folder based application, it is not the case as one-to-one relationship has to be maintained between the item (email) and folder.</p>
<p>Delicious and Yahoo! Bookmarks are popular bookmarking sites both offered by Yahoo. Delicious is tag based however Yahoo! Bookmarks uses integration of both. In Yahoo! Bookmarks, bookmarks can be stored in a folder and also tagged with multiple tags. Users are able to view bookmarks either folder-wise or tag-wise.</p>
<p>Now a day, more and more applications are offering tag-based systems or integration of both. Popular photo sharing sites like Flickr, Picasa offers integration of both. Blogging site Blogger.com offers label based system while Wordpress.com offers integration of both.</p>
<p>Personally I favour folder based system, as tags for me seem to be more specific and folders look clean. However integration of both is of course excellent.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.surajshrestha.com.np/web-application/tag-based-or-folder-based.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
