<?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>Expressing IT &#187; Best Practices</title>
	<atom:link href="http://developer.expressionz.in/blogs/category/user_interface_developers/best-practices/feed/" rel="self" type="application/rss+xml" />
	<link>http://developer.expressionz.in/blogs</link>
	<description>User Interface : just another, but a serious developers weblog</description>
	<lastBuildDate>Thu, 20 May 2010 18:05:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Calling Multiple Windows Onload Functions In Javascript</title>
		<link>http://developer.expressionz.in/blogs/2009/03/07/calling-multiple-windows-onload-functions-in-javascript/</link>
		<comments>http://developer.expressionz.in/blogs/2009/03/07/calling-multiple-windows-onload-functions-in-javascript/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 10:08:50 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[XSL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=88</guid>
		<description><![CDATA[Heres another little piece of Javascript trickery that I had to dig around because the situation commanded it. In one of my web sites, I had this situation where I had to implement "windows.onload" twice. The first thing that would came to an inexpeienced mind like mine ( I  have to say that, since I have been using javascript Frameworks and libraries, I have forgotton to simple things on my own... sad but true), is the following method]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F03%2F07%2Fcalling-multiple-windows-onload-functions-in-javascript%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F03%2F07%2Fcalling-multiple-windows-onload-functions-in-javascript%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Tips+%26amp%3B+Tricks" height="61" width="50" /><br />
			</a>
		</div>
<p>Heres another little peice of Javascript trickery that I had to dig around because the situation commaned it. In one of my web sites, I had this situation where I had to implement &#8220;windows.onload&#8221; twice. The first thing that would came to an inexperienced mind like mine ( I  have to honestly say that, since I have been using  javascript Frameworks and libraries, I have forgotton to do simple things on my own&#8230; sad but true), is the  following method&#8230;</p>
<blockquote><pre class=""javascript"">
window.onload=onloadfn1;
window.onload=onloadfn2;
window.onload=onloadfn3;
etc...
</pre>
</blockquote>
<p>Sorry to say but, this wont work&#8230; dont want to discuss the execution science of Javascript much &#8230; but according to my recent experience, only the last function (onloadfn3) will ill actually get executed.</p>
<p>In normal situations, unlike mine (which I&#8217;ll talk about a little later)&#8230; you could do one of the following to execute mutliple onload functions &#8230;.</p>
<blockquote><p><strong>OR something like this</strong></p>
<pre class=""javascript"">
function doOnLoad() {
        onloadfn1();
        onloadfn2();
        onloadfn3();
}
window.onload = doOnLoad;
</pre>
</blockquote>
<p>For my current situation , I cannot use either  of the above&#8230;<br />
Why did I need to call windows.onload twice, rather that calling two functions within a single onload function? Here is quick look at my problem statement&#8230;</p>
<p><em>&#8220;My Site pages are  structured like the WORDPRESS theme&#8230;. i.e. there is a common Header.php and Footer.php that gets included into all the site pages. There is an onload function implementaion in the Footer.php to do some common onload functions. AND there are few pages that need to something of their own ONLOAD , apart from those done by the common onload function. If I assign callback function directly to the window.onload handler, it will over-ride previously assigned callbacks in the Footer.php&#8221;</em></p>
<p>&#8230;. Is my problem understood <img src='http://developer.expressionz.in/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ?</p>
<p>Well! there are few solutions that I did find. They all are very similar and mainly implementions of a solution given by Simon Willison  (<a href="http://simonwillison.net/2004/May/26/addLoadEvent/" target="_new">http://simonwillison.net/2004/May/26/addLoadEvent/</a>)&#8230;</p>
<p><strong>Solution :</strong></p>
<blockquote><p><strong>Simply add this javascript code to site &#8230;</strong></p>
<pre class="css">
function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != <span class="cssString">&#039;function&#039;</span>) {
       window.onload = func
    <span class="cssMedia">}</span> else {
       window.onload = function() {
           if (oldonload) {
                  oldonload()
          <span class="cssMedia">}</span>
          func()
       <span class="cssMedia">}</span>
   <span class="cssMedia">}</span>
<span class="cssMedia">}</span>
</pre>
<p>And call it instead of the usual &#8220;windows.onload&#8221;</p>
<pre class="css">
addLoadEvent(FunctionToRunOnPageLoad);
addLoadEvent(function() {
/* more code to run on page load *
<span class="cssMedia">}</span>); </pre>
</blockquote>
<p><strong>Advantages of this code snippet &#8230;</strong><br />
1.  Primarily, It lets you have multiple windows.onload events, called from seperate parts of your code,   without overridding the previous definition<br />
2. It is really unobtrusive. It can be placed in a file with your other scripts or in a separate file.<br />
3. It works even if window.onload has already been set.</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2009/03/07/calling-multiple-windows-onload-functions-in-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Best Practices: Keep the Number of DOM Elements Small</title>
		<link>http://developer.expressionz.in/blogs/2008/06/06/best-practices-keep-the-number-of-dom-elements-small/</link>
		<comments>http://developer.expressionz.in/blogs/2008/06/06/best-practices-keep-the-number-of-dom-elements-small/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 05:14:00 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[User Interface Desgin]]></category>
		<category><![CDATA[DOM]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=24</guid>
		<description><![CDATA[More the DOM elements on the page, slower it renders, slower is the DOM access in JavaScript’s. A high number of DOM elements can be due bad layout design.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F06%2F06%2Fbest-practices-keep-the-number-of-dom-elements-small%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F06%2F06%2Fbest-practices-keep-the-number-of-dom-elements-small%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Best+Practices,DOM" height="61" width="50" /><br />
			</a>
		</div>
<p>More the DOM elements on the page, slower it renders, slower is the DOM access in JavaScript’s. A high number of DOM elements can be due bad layout design. For instance, nested tables might have been used for layout purposes. Use any HTML Tag where is makes sense semantically. For E.g. DONOT use tables for layouts, but DONOT hesitate to use them where you have to display tabular data, and hence will use reduce DOM elements, in comparison, to a similar structure created using DIVs only..</p>
<blockquote><p>To test the number of DOM elements in your HTML page, just type the following in the Firebug&#8217;s console:<code>document.getElementsByTagName('*').length</code></p></blockquote>
<p>There is no set standard as to how many DOM elements are too many. Check other similar pages that have good markup.Eg. Yahoo! Home Page is a pretty busy page and still under 700 elements (HTML tags).</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/06/06/best-practices-keep-the-number-of-dom-elements-small/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices: Using AJAX</title>
		<link>http://developer.expressionz.in/blogs/2008/06/02/best-practices-using-ajax/</link>
		<comments>http://developer.expressionz.in/blogs/2008/06/02/best-practices-using-ajax/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 03:12:21 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[User Interface Desgin]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=22</guid>
		<description><![CDATA[
			
				
			
		
Use GET for AJAX Requests
It has been found that when using XMLHttpRequest, POST is implemented in the browsers as a two-step process: sending the headers first, then sending data. So it&#8217;s best to use GET, which only takes one TCP packet to send (unless you have a lot of cookies). The maximum URL length in [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F06%2F02%2Fbest-practices-using-ajax%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F06%2F02%2Fbest-practices-using-ajax%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=AJAX,Best+Practices" height="61" width="50" /><br />
			</a>
		</div>
<h4>Use GET for AJAX Requests</h4>
<p>It has been found that when using XMLHttpRequest, POST is implemented in the browsers as a two-step process: sending the headers first, then sending data. So it&#8217;s best to use GET, which only takes one TCP packet to send (unless you have a lot of cookies). The maximum URL length in IE is 2K, so if you send more than 2K data you might not be able to use GET.<br />
An interesting side affect is that POST without actually posting any data behaves like GET. GET is meant for retrieving information, so it makes sense (semantically) to use GET when you&#8217;re only requesting data, as opposed to sending data to be stored server-side. </p>
<h4>Avoid Synchronous AJAX Calls</h4>
<p>When making &#8220;Ajax&#8221; requests, you may choose either async or sync mode. Async mode runs the request in the background while other browser activities can continue to process. Sync mode will wait for the request to return before continuing.<br />
Requests made with sync mode should be avoided. These requests will cause the browser to lock up for the user until the request returns. In cases where the server is busy and the response takes a while, the user&#8217;s browser (and maybe OS) will not allow anything else to be done. In cases where a response is never properly received, the browser may continue to block until the request is timed out.<br />
If you think that your situation requires sync mode, it is most likely time to re-think your design. Very few (if any) situations actually require Ajax requests in sync mode. </p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/06/02/best-practices-using-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices: Working with Images</title>
		<link>http://developer.expressionz.in/blogs/2008/05/22/best-practices-working-with-images/</link>
		<comments>http://developer.expressionz.in/blogs/2008/05/22/best-practices-working-with-images/#comments</comments>
		<pubDate>Fri, 23 May 2008 05:51:18 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[User Interface Desgin]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=21</guid>
		<description><![CDATA[
			
				
			
		
Optimize Images
Optimization simply means keeping the size of the image small keeping the quality of image to the required level. There are loads of procedures that once can carry out to optimize images before they are loaded on to the server for delivery. The tools that we use for creation of these images (Photoshop, Fireworks [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F22%2Fbest-practices-working-with-images%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F22%2Fbest-practices-working-with-images%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Best+Practices" height="61" width="50" /><br />
			</a>
		</div>
<h4>Optimize Images</h4>
<p>Optimization simply means keeping the size of the image small keeping the quality of image to the required level. There are loads of procedures that once can carry out to optimize images before they are loaded on to the server for delivery. The tools that we use for creation of these images (Photoshop, Fireworks etc) usually have tools that allow users to optimize the image for web use.<br />
• Check the GIF’s to see if they are using a palette size corresponding to the number of colors in the image. When an image is using 4 colors and a 256 color palette, then the image could be further optimized</p>
<p>• Convert GIF’s to PNG’s where possible and see if there is a saving. More often than not, there is. Do not hesitate to use of PNG’s, as they are fully supported by most of the commonly used browsers. Expect of the animation capabilities a PNG can do what a GIF does, including transparency.</p>
<p>• For the images used in CSS sprites, arrange the images in the sprite horizontally as opposed to vertically usually results in a smaller file size. Also, combine images with similar colors in a sprite. This helps you keep the color count low, ideally under 256 colors so to fit in a PNG8.</p>
<p>• If you are using a favicon.ico, keep it small, preferably under 1K.</p>
<h4>Use properly scaled/resized image.</h4>
<p>Always try and use resized images, i.e. don&#8217;t use a bigger image than you need just because you can set the width and height in HTML. If you need to display a 100px X 100px image on the page, then do not use a scaled down 200&#215;200px image.</p>
<h4>Use Progressive Images</h4>
<p>A web browser already renders Images progressively. To do even better, simply save your GIF or PNG images with the &#8220;interlaced&#8221; option, or your JPEG images with the &#8220;progressive&#8221; option.</p>
<p>There is ongoing debate among web users as to whether use of progressive image is a blessing or a hindrance. Also a progressive image weighs approximately 20% more than its non progressive counterpart. So , If you think you layout uses images that will not hamper the user –experience by it being progressive, feel free to do so.</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/05/22/best-practices-working-with-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices: Working with JavaScript’s</title>
		<link>http://developer.expressionz.in/blogs/2008/05/15/best-practices-working-with-javascript%e2%80%99s/</link>
		<comments>http://developer.expressionz.in/blogs/2008/05/15/best-practices-working-with-javascript%e2%80%99s/#comments</comments>
		<pubDate>Thu, 15 May 2008 19:47:28 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[User Interface Desgin]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=20</guid>
		<description><![CDATA[
			
				
			
		
Include JavaScript’s at the Bottom of the HTML Document
If you do not have document.write ( or any dynamic generation of page contents using javascripts) to insert part of the page&#8217;s content in your scripts, move the script include statement to the bottom of the page, before the end of the BODY tag.
The HTTP/1.1 specification suggests [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F15%2Fbest-practices-working-with-javascript%25e2%2580%2599s%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F15%2Fbest-practices-working-with-javascript%25e2%2580%2599s%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Best+Practices,Javascript" height="61" width="50" /><br />
			</a>
		</div>
<h4>Include JavaScript’s at the Bottom of the HTML Document</h4>
<p>If you do not have document.write ( or any dynamic generation of page contents using javascripts) to insert part of the page&#8217;s content in your scripts, move the script include statement to the bottom of the page, before the end of the BODY tag.<br />
The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won&#8217;t start any other downloads, even on different hostnames.<br />
There are also ways to dynamically create SCRIPT nodes and load remote scripts after the page is loaded using AJAX .</p>
<h4>Externalise you JavaScript’s</h4>
<p>Using external JavaScript files will result in faster loading of  pages because the JavaScript files are cached by the browser. Inline JavaScript’s’ in HTML documents get downloaded every time the HTML document is requested. This might actually reduce the number of HTTP requests made but it subsequently increases the size of the HTML document. External JavaScript’s are cached by the browser; the size of the HTML document is reduced without increasing the number of HTTP requests.<br />
Please note that, if users on your site have multiple page views per session and many of your pages re-use the same scripts and stylesheets, there is a greater potential benefit from cached external files.</p>
<h4>Pack Your Javascript Files</h4>
<p>In case of JavaScripts , unlike CSS, the files could crunched using some standard algorithms that would give a reduced file size than simply removing spaces or tabs. An example of javascript packer can be found here http://dean.edwards.name/packer/</p>
<h4>Get rid of any Duplicate Scripts</h4>
<p>It is very unusual that entire scripts might be duplicated, but a review of the ten top U.S. web sites shows that two of them contain a duplicated script. Duplicate scripts  but obviously reduces the performance by creating unnecessary HTTP requests and wasted JavaScript execution.<br />
Also, in many instances, though the scripts names are different, there is a likelihood of duplicate scripts within the same page due to team size and number of scripts.</p>
<h4>Minimize accessing DOM elements where possible</h4>
<p>Accessing DOM elements with JavaScript is slow so in order to have a more responsive page, you should:<br />
•	Cache references to accessed elements<br />
•	Update nodes &#8220;offline&#8221; and then add them to the tree<br />
•	Avoid fixing layout with JavaScript</p>
<h4>Separate Behavior from Content and Presentation</h4>
<p>Just as we separate Presentation (CSS/XSLT) from Content (XHTML/XML), we should also separate Behavior (Javascript). This is called unobtrusive Javascript. Just as we link to external CSS files, we should link to external javascript files.</p>
<p>Instead of hard coding behavior into the content (e.g. onmouseover, onclick, etc.), behavior should be dynamically added to elements, classes, and unique elements (IDs) using the DOM. The foundational document, the content, should contain only valid XHTML/XML and no javascript.<br />
Javascript should augment content by adding behavior. The content should remain useful and usable without javascript (or without full javascript support).</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/05/15/best-practices-working-with-javascript%e2%80%99s/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices : Be aware of the page weight</title>
		<link>http://developer.expressionz.in/blogs/2008/05/07/best-practices-be-aware-of-the-page-weight/</link>
		<comments>http://developer.expressionz.in/blogs/2008/05/07/best-practices-be-aware-of-the-page-weight/#comments</comments>
		<pubDate>Thu, 08 May 2008 02:56:39 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[User Interface Desgin]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=23</guid>
		<description><![CDATA[
			
				
			
		
I have saved this article ages back, so Sorry! I dont remember the source &#8230; but it seemed useful , for us who have to be aware about the audience for whom we develop the site for &#8230; so here i is
Page weight can be used to determine the download time for a given page [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F07%2Fbest-practices-be-aware-of-the-page-weight%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F07%2Fbest-practices-be-aware-of-the-page-weight%2F&amp;source=nikhild&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I have saved this article ages back, so Sorry! I dont remember the source &#8230; but it seemed useful , for us who have to be aware about the audience for whom we develop the site for &#8230; so here i is</p>
<p>Page weight can be used to determine the download time for a given page on a variety of Internet connection speeds. By way of example, the following table shows the download times for three different pages at a number of popular connection speeds.</p>
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding: 1.5pt; background: #224488 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" colspan="4">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="color: white;">Page Weight Download Times</span></strong></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="color: black;">Connection Speed</span></strong></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><strong><span style="color: black;">20 Kb Page</span></strong></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><strong><span style="color: black;">40 Kb Page</span></strong></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><strong><span style="color: black;">100 Kb Page</span></strong></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">14.4 Kbps</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">12 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">25 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">62 sec</span></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">28.8 Kbps</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">6 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">12 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">31 sec</span></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">33.3 Kbps</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">5 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">10 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">26 sec</span></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">56 Kbps (V.90)</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">2 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">5 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">13 sec</span></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">64 Kbps (ISDN)</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">2 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">4 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">12 sec</span></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">128 Kbps (DSL/Cable)</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">1 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">2 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">6 sec</span></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">256 Kbps (DSL/Cable)</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">&lt;1 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">1 sec</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">3 sec</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoBodyText"><span style="font-size: 11pt; color: #333333;"> </span></p>
<p class="MsoBodyText"><span style="font-size: 11pt; color: #333333;"> </span></p>
<h4>
Benefits of reducing page weight?</h4>
<p class="MsoNormal" style="margin: 10.2pt 0in;"><span style="color: black;">The positive impact of reducing page weight benefits both website owners and consumers. Potential benefits include:</span></p>
<ol style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="color: black; margin-top: 10.2pt; margin-bottom: 10.2pt;">Pages load faster. The most      obvious impact of reducing page weight is that your website&#8217;s pages will      load faster for visitors, regardless of their connection speed.</li>
<li class="MsoNormal" style="color: black; margin-top: 10.2pt; margin-bottom: 10.2pt;">Lower page load times create      more comfortable visitors. Visitors are less likely to become frustrated      and go elsewhere if your pages load quickly. On the other hand,      slow-loading pages are one of the surest ways to lose visitors and      potential customers.</li>
<li class="MsoNormal" style="color: black; margin-top: 10.2pt; margin-bottom: 10.2pt;">Faster load-times will      contribute to increased conversion. More visitors will stay on your site      longer. More of them will end up making purchases, signing up for your      newsletter, or book-marking your site.</li>
<li class="MsoNormal" style="color: black; margin-top: 10.2pt; margin-bottom: 10.2pt;">Your brand perception will be      enhanced. Returning customers and first-time visitors alike will be more      inclined to describe your site (and business) as &#8220;professional&#8221;      if your pages load quickly.</li>
<li class="MsoNormal" style="color: black; margin-top: 10.2pt; margin-bottom: 10.2pt;">Pages with clean, solid code      will often be indexed more effectively by natural search engines.</li>
<li class="MsoNormal" style="color: black; margin-top: 10.2pt; margin-bottom: 10.2pt;">Pages optimized for weight      can actually save bandwidth charges on high-traffic sites. 100,000 pages      each weighing 150 Kb will require twice as much bandwidth from your ISP      than 100,000 pages each weight 75 Kb. For ISPs that charge for bandwidth      used or for overages, this reduction can create significant savings on      bandwidth charges.</li>
</ol>
<p class="MsoBodyText"><span style="font-size: 11pt; color: #333333;"> </span></p>
<p class="MsoNormal" style="margin: 10.2pt 0in;"><span style="color: black;"><strong>Consider the following data, published in a report </strong></span></p>
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding: 1.5pt; background: #224488 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" colspan="2">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="color: white;">Visitor Abandonment</span></strong></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="color: black;">Page Load Time</span></strong></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><strong><span style="color: black;">Percent of Users</span></strong><strong><span style="color: black;"><br />
<strong>Continuing to Wait</strong></span></strong></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">10 seconds</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">84%</span></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">15 seconds</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">51%</span></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">20 seconds</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">26%</span></p>
</td>
</tr>
<tr>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">30 seconds</span></p>
</td>
<td style="padding: 1.5pt 0in 1.5pt 1.5pt;">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: black;">5%</span></p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/05/07/best-practices-be-aware-of-the-page-weight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices: Working with CSS</title>
		<link>http://developer.expressionz.in/blogs/2008/04/24/best-practices-working-with-css/</link>
		<comments>http://developer.expressionz.in/blogs/2008/04/24/best-practices-working-with-css/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 02:40:29 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[User Interface Desgin]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=19</guid>
		<description><![CDATA[
			
				
			
		
Put Stylesheets at the Top
If you want a page to load progressively; that is, we want the browser to display whatever content it has as soon as possible, put the CSS at the top of the page inside the document HEAD. This makes pages appear to be loading faster, as this facilitates progressive rendering of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F04%2F24%2Fbest-practices-working-with-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F04%2F24%2Fbest-practices-working-with-css%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Best+Practices,CSS" height="61" width="50" /><br />
			</a>
		</div>
<h4>Put Stylesheets at the Top</h4>
<p>If you want a page to load progressively; that is, we want the browser to display whatever content it has as soon as possible, put the CSS at the top of the page inside the document HEAD. This makes pages <em><span style="font-style: normal;">appear</span></em> to be loading faster, as this facilitates progressive rendering of the page. This is especially important for pages with a lot of content and for users on slower Internet connections.</p>
<p>It is a documented fact that to enhance overall user experience, it is important to provide progress indicators and visual feedbacks. To avoid having to redraw elements of the page, in case if their styles change, some browsers, including IE, blocks rendering of the page until the CSS is fully loaded. Because of this, the user is gets to see <span> </span>a blank white page.</p>
<p>The W3 HTML Specifications’ also states that the CSS must me include in the HEAD section of the HTML page. Also note that, In IE <code><span style="font-size: 10pt;">@import</span></code> behaves the same as using <code><span style="font-size: 10pt;">&lt;link&gt;</span></code> at the bottom of the page, so it&#8217;s best not to use it.</p>
<h4>Avoid Using Browser Specific features</h4>
<p><strong>Filters :</strong> Use of filter<span> </span>increases memory consumption and is applied per element, not per image, so the problem is multiplied. Also, Filters are IE Proprietary, hence will not work as intended in other browsers. If you want transparent or gradient backgrounds, use 1Pixel with images.<br />
<strong>Expressions :</strong> CSS expressions are a nice feature to have in CSS, but still is IE specific feature. Also, it is important to note that, these expressions are<span> </span>evaluated when the page is rendered and resized, scrolled and even when the user moves the mouse over the page. Needless to say this could affect the performance of your page. Hence in simple words ,Avoid using CSS expressions, unless you feel its pros’ weighs more than its cons’</p>
<h4>Externalise you CSS</h4>
<p>Using external CSS will result in faster loading of<span> </span>pages because the JavaScript and CSS files are cached by the browser. Inline CSS in HTML documents get downloaded every time the HTML document is requested. This might actually reduce the number of HTTP requests made but it subsequently increases the size of the HTML document. External CSS are cached by the browser; the size of the HTML document is reduced without increasing the number of HTTP requests.</p>
<p>Please note that, if users on your site have multiple page views per session and many of your pages re-use the same scripts and stylesheets, there is a greater potential benefit from cached external files.</p>
<h4>Pack Your CSS File</h4>
<p>Packing or crunching your CSS is the practice of removing unnecessary characters from code to reduce its size thereby improving load times.</p>
<p>The CSS can me crunched by removing all the comments and any unwanted characters like white spaces, newlines etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/04/24/best-practices-working-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices for a UI Developer</title>
		<link>http://developer.expressionz.in/blogs/2008/03/14/best-practices-for-a-ui-developer/</link>
		<comments>http://developer.expressionz.in/blogs/2008/03/14/best-practices-for-a-ui-developer/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 09:34:15 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[User Interface Desgin]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=18</guid>
		<description><![CDATA[The content here will be a amalgamation of my personal UI development Best Practices with those written by the standard developers like Yahoo , Google etc.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F03%2F14%2Fbest-practices-for-a-ui-developer%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F03%2F14%2Fbest-practices-for-a-ui-developer%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Best+Practices" height="61" width="50" /><br />
			</a>
		</div>
<p>For ages, I have thinking to consolidate all the BEST Practices , I have been reading every now and then. Finally! I did get down to put it to pen. I realized that It is going to be mammoth task creating this mammoth document , so I decided to dedicate an entire category to it, so I could keep adding stuff about best practices as and when i encounter them&#8230;</p>
<p>Well! the content here will be a amalgamation of my personal UI development Best Practices with those written by the standard developers like Yahoo , Google etc.</p>
<p>Watch this space and keep browing the <a title="Best Practices" href="http://developer.expressionz.in/blogs/?cat=23" target="_self">Best Practices Category</a></p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/03/14/best-practices-for-a-ui-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
