<?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>Paul Bennett - User Interface Developer &#187; Performance</title>
	<atom:link href="http://pmbennett.net/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://pmbennett.net</link>
	<description></description>
	<lastBuildDate>Thu, 27 Oct 2011 15:10:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Performance on pmbennett.net</title>
		<link>http://pmbennett.net/2009/11/12/performance-on-pmbennett-net/</link>
		<comments>http://pmbennett.net/2009/11/12/performance-on-pmbennett-net/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 12:49:10 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://pmbennett.net/?p=209</guid>
		<description><![CDATA[Whilst designing the new skin for this site, I made the decision to go for a single page layout with a few other templates for the archive, portfolio and articles pages. I didn't really consider the impications of this for the speed at which my page loads until I read <a href="http://css-tricks.com/images-on-a-subdomain/">Chris Coyier's article about serving images from a subdomain</a>. That got me thinking, especially with all the imagery I was going to need to use. So I had a think about what things I could do to either reduce the size of the page, reduce the number of requests and generally speed things up. Here are three steps I took to do this, which have actually shaved an average of 4 seconds off the page load time.]]></description>
			<content:encoded><![CDATA[<h5>Let Google host your jQuery files</h5>
<p>The jQuery library is one of many libraries hosted by <a href="http://code.google.com/apis/ajaxlibs/">Google AJAX Libraries</a>. Up until this redesign, I had thought nothing of downloading the latest version, uploading it to my webserver and including it as usual in the document head. However, after reading a number of articles about browsers limiting the number of simultaneous connections, it was obvious that using the files hosted by Google will free up connections for other resources to be downloaded.</p>
<p>This isn&#8217;t the only benefit of using files hosted by Google. Google&#8217;s Content Delivery Network (CDN) means that anyone anywhere in the world can view the page and not have to endure the increased latency of downloading the resources from my single web server (which could be half the world away!). Not only that, but if other sites use Google&#8217;s AJAX libraries, then these files will be cached in many people&#8217;s browsers already! So they won&#8217;t even need to download them!</p>
<h5>Serve Resources from a Subdomain</h5>
<p>This was obviously the reason why I began look into the performance of my site. I have already explained how browsers limit the number of simultaneous connections, so setting up a subdomain that points to the directory on your server where your images are stored will trick the browser into thinking they are stored on a different domain. As previously stated, this wil free up connections so that other resources can be downloaded, thus decreasing the overall time taken to download all resources that make up the page.</p>
<h5>Image Sprites</h5>
<p>I have been using this technique for years now, but it is still worth mentioning as it really can have a big impact on the number of requests made when loading a page. For example, when I first created the skin for my site, I used no sprites and there were 36 separate requests made by the browser. After generating a few image sprites, I managed to reduce the amount of requests to 28!</p>
<h5>To wrap up&#8230;</h5>
<p>The below screenshot shows the Net panel in Firebug when loading my site in Firefox. As you can see I have jQuery hosted by Google; images and Javascript files are served from resources.pmbennett.net; and the stylesheets are served from pmbennett.net. As I mentioned at the beginning, this has shaved 4 seconds off the average page load speed!</p>
<p><img src="http://resources.pmbennett.net/demos/images/performance.png" alt="Screenshot of Firebug Net panel" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pmbennett.net/2009/11/12/performance-on-pmbennett-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

