<?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>Pete Williams &#187; Web</title>
	<atom:link href="http://petewilliams.info/blog/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://petewilliams.info/blog</link>
	<description>On Web Development and stuff</description>
	<lastBuildDate>Wed, 07 Dec 2011 11:36:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Generate HTML5 &lt;time&gt; tag&#8217;s datetime attribute in PHP</title>
		<link>http://petewilliams.info/blog/2010/09/generate-html5-time-tags-datetime-attribute-in-php/</link>
		<comments>http://petewilliams.info/blog/2010/09/generate-html5-time-tags-datetime-attribute-in-php/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 20:53:42 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/?p=450</guid>
		<description><![CDATA[HTML5 now includes a <time> tag which is readable both by machines and humans. This PHP snippet will generate the machine-readable part for you.]]></description>
			<content:encoded><![CDATA[<p>Having just finished reading <a href="http://www.amazon.co.uk/Introducing-HTML-Voices-That-Matter/dp/0321687299/">Introducing HTML5</a> I&#8217;m rather excited about all the new HTML5 tags and can&#8217;t wait to get using them!</p>
<p>One of the new semantic tags is the &lt;time&gt; tag which is used to mark up dates and times so they are readable to both humans and to machines. It does this by including a datetime attribute which contains the relevent date in a standardised format.</p>
<p>For instance:</p>
<pre class="code">
&lt;p&gt;
   This post was written on &lt;time datetime="2010-09-16T21:28:29+01:00"&gt;Thursday evening&lt;/time&gt;
&lt;p&gt;
</pre>
<p>As you can see, the machine readable format is &#8220;YYYY-MM-DD&#8221; with a &#8220;T&#8221; to separate the time in the 24-hour format HH:MM. It ends with your timezone&#8217;s offset from <acronym title="Coordinated Universal Time">UTC</acronym>/<acronym title="Greenwich Mean Time">GMT</acronym>.</p>
<h3>UPDATE</h3>
<p><strong>Ignore everything that follows! As clever commenters pointed out, there is actually a PHP constant for this format &#8211; <em>DATE_W3C</em>. All you need to get the current time isâ€¦</strong></p>
<pre class="code">
&lt;?php echo date(DATE_W3C); ?&gt;
</pre>
<p><strong>All that follows, from the original post, is left for reference onlyâ€¦</strong></p>
<p>To make this easier to generate when dealing with dates in PHP, I have written a function to do this for me, which is below. Feel free to use it and let me know of any suggestions for improvement.</p>
<p>To use the function, pass in a unix timestamp or leave blank to use the current time.</p>
<pre class="code">
&lt;?php

/**
 * formats the date passed into format required by 'datetime' attribute of <time> tag
 * if no intDate supplied, uses current date.
 * @author Pete Williams
 * @link http://petewilliams.info/blog/2010/09/generate-html5-time-tags-datetime-attribute-in-php/
 * @param intDate integer optional
 * @return string
 **/
function getDateTimeValue( $intDate = null ) {

	$strFormat = 'Y-m-d\TH:i:sP';
	$strDate = $intDate ? date( $strFormat, $intDate ) : date( $strFormat ) ; 

	return $strDate;
}

echo getDateTimeValue();
</pre>
<p>Example: <a href="http://petewilliams.info/datetime.php">view current time in datetime format</a>.</p>
<p><em>Buy <a href="http://www.networksolutions.com/domain-name-registration/index.jsp">domain names</a> for just $13/year.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2010/09/generate-html5-time-tags-datetime-attribute-in-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Display HTML OL/UL list as comma-separated sentence with CSS</title>
		<link>http://petewilliams.info/blog/2010/04/display-html-olul-list-as-comma-separated-sentence/</link>
		<comments>http://petewilliams.info/blog/2010/04/display-html-olul-list-as-comma-separated-sentence/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 22:56:15 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/?p=438</guid>
		<description><![CDATA[On a site I&#8217;m currently working on, it seemed best to display an OL as a list in sentence form. For example: &#60;ul class="commaList"&#62; &#60;li&#62;one&#60;/li&#62; &#60;li&#62;two&#60;/li&#62; &#60;li&#62;three&#60;/li&#62; &#60;li&#62;four&#60;/li&#62; &#60;/ul&#62; Would display as: One, two, three and four. In case this CSS is of any use to anyone else, I&#8217;ve published it as a snippet below. [...]]]></description>
			<content:encoded><![CDATA[<p>On a site I&#8217;m currently working on, it seemed best to display an OL as a list in sentence form.</p>
<p>For example:</p>
<pre class="code">
&lt;ul class="commaList"&gt;
	&lt;li&gt;one&lt;/li&gt;
	&lt;li&gt;two&lt;/li&gt;
	&lt;li&gt;three&lt;/li&gt;
	&lt;li&gt;four&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Would display as: <em>One, two, three and four.</em></p>
<p>In case this CSS is of any use to anyone else, I&#8217;ve published it as a snippet below.</p>
<p>Please note this uses pseudo-selectors and so will not work in IE, but will gracefully degrade.</p>
<pre class="code">
/* display ordered list as comma list */
.commaList li:first-child {
	text-transform: capitalize;
}

.commaList li:after{
	content: ',';
	padding-right: 5px;
}

.commaList li:nth-last-child(2):after {
	content: '';
	padding-right: 5px;
}

.commaList li:last-child:before {
	content: 'and ';
	padding-right: 0;
}

.commaList li:last-child:after {
	content: '.';
	clear: both;
}

/* this prevents single item lists from containing commas and 'ands' */
.commaList li:only-of-type:before, .commaList li:only-of-type:after {
	content: '';
	padding: 0;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2010/04/display-html-olul-list-as-comma-separated-sentence/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amazon Link Localizer Greasemonkey Script</title>
		<link>http://petewilliams.info/blog/2009/09/amazon-link-localizer-greasemonkey-script/</link>
		<comments>http://petewilliams.info/blog/2009/09/amazon-link-localizer-greasemonkey-script/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 23:29:40 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[add-on]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[amazon.ca]]></category>
		<category><![CDATA[amazon.co.jp]]></category>
		<category><![CDATA[amazon.co.uk]]></category>
		<category><![CDATA[amazon.com]]></category>
		<category><![CDATA[amazon.de]]></category>
		<category><![CDATA[amazon.fr]]></category>
		<category><![CDATA[amazon.jp]]></category>
		<category><![CDATA[britain]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[canada]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[france]]></category>
		<category><![CDATA[germany]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[great britain]]></category>
		<category><![CDATA[international]]></category>
		<category><![CDATA[japan]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[localise]]></category>
		<category><![CDATA[localize]]></category>
		<category><![CDATA[nearest]]></category>
		<category><![CDATA[regional]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[uk]]></category>
		<category><![CDATA[united kingdom]]></category>
		<category><![CDATA[user script]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/?p=379</guid>
		<description><![CDATA[This Greasemonkey script will convert links to international Amazon sites into links to your local Amazon site.
So if I link to a product on Amazon.co.uk, and you are a US visitor, you will get a link to that same product on Amazon.com instead.]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#suggest {
	display: none;
}
</style>
<p>This Greasemonkey script will convert links to international Amazon sites into links to your local Amazon site.<br />
So if I link to a product on Amazon.<span id="tldNot">co.uk</span>, you will get a link to that same product on Amazon.<span id="tld">com</span> instead.</p>
<p><a href="http://www.greasespot.net/">Greasemonkey</a> is an add-on for Firefox that allows you to run user-generated scripts on the websites you visit. If you haven&#8217;t got it yet, <a href="https://addons.mozilla.org/firefox/748/">download it now</a>, as you&#8217;ll need it to install the below script.</p>
<p>Once you&#8217;ve installed Greasemonkey, simply click the below link to install the script.</p>
<div id="suggest">
<p>As you&#8217;re visiting from <span id="country">US</span>, you&#8217;re probably looking for the Amazon.<span id="tld2">com</span> Script, right?</p>
<p><strong>Download</strong>: <a href="/files/gm/amazon.us.user.js" id="download" onclick="pageTracker._trackPageview( 'download_amzn_gm_script' );">Amazon.<span id="tld3">com</span> Link Localiser</a> (or <a href="" onclick="return showOptions()">see all options</a>)</p>
</div>
<div id="all_scripts">
Download the script for your local Amazon site:</p>
<ul>
<li><a href="/files/gm/amazon.ca.user.js" id="ca" onclick="pageTracker._trackPageview( 'download_amzn_gm_script' );">Amazon.ca Link Localiser</a></li>
<li><a href="/files/gm/amazon.co.uk.user.js" id="uk" onclick="pageTracker._trackPageview( 'download_amzn_gm_script' );">Amazon.co.uk Link Localiser</a></li>
<li><a href="/files/gm/amazon.com.user.js" id="us" onclick="pageTracker._trackPageview( 'download_amzn_gm_script' );">Amazon.com Link Localiser</a></li>
<li><a href="/files/gm/amazon.de.user.js" id="de" onclick="pageTracker._trackPageview( 'download_amzn_gm_script' );">Amazon.de Link Localiser</a></li>
<li><a href="/files/gm/amazon.fr.user.js" id="fr" onclick="pageTracker._trackPageview( 'download_amzn_gm_script' );">Amazon.fr Link Localiser</a></li>
<li><a href="/files/gm/amazon.jp.user.js" id="jp" onclick="pageTracker._trackPageview( 'download_amzn_gm_script' );">Amazon.jp Link Localiser</a></li>
</ul>
</div>
<h3>Updates</h3>
<p><a href="http://twitter.com/PeteWilliams">Follow me on Twitter</a> to be sure you hear about new updates.</p>
<p><script type="text/javascript" src="http://js.petewilliams.info/gm.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2009/09/amazon-link-localizer-greasemonkey-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amazon Affiliate Link Localizer WordPress Plugin</title>
		<link>http://petewilliams.info/blog/2009/09/amazon-affiliate-link-localizer-wordpress-plugin/</link>
		<comments>http://petewilliams.info/blog/2009/09/amazon-affiliate-link-localizer-wordpress-plugin/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 06:44:41 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[affiliate]]></category>
		<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[affiliates]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[amazon.ca]]></category>
		<category><![CDATA[amazon.co.jp]]></category>
		<category><![CDATA[amazon.co.uk]]></category>
		<category><![CDATA[amazon.com]]></category>
		<category><![CDATA[amazon.de]]></category>
		<category><![CDATA[amazon.fr]]></category>
		<category><![CDATA[amazon.jp]]></category>
		<category><![CDATA[associate]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[improve referrals]]></category>
		<category><![CDATA[improve sales]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[referral]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[weblog]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/?p=366</guid>
		<description><![CDATA[This Wordpress plugin changes any Amazon links on your site to use your affiliate ID. It also changes the link to point to the user's local Amazon store.

So if your visitor is visiting form the UK they'll get a link to Amazon.co.uk, if they're visiting from the US they'll get a link to the same product on Amazon.com.]]></description>
			<content:encoded><![CDATA[<h3>Download</h3>
<p>Current Version: <a href="http://wordpress.org/extend/plugins/amazon-affiliate-link-localizer/">Amazon Affiliate Link Localizer 1.7</a><br />
Last Updated: 22/09/2011</p>
<h3>Description</h3>
<p>This plugin not only automatically changes any Amazon link on your site to use your affiliate ID, but it also changes the link to point to the user&#8217;s local Amazon store. </p>
<p>So if your visitor is visiting from the UK they&#8217;ll get a link to Amazon.co.uk, if they&#8217;re visiting from the US they&#8217;ll get a link to the same product on Amazon.com. Initially, the script looks for a product with the same product ID as the one in your link, but if it can&#8217;t find one on the user&#8217;s local store, it will link to a search results page searching for the name of your product. This means that it will still be found even if international versions have different product IDs, and if it&#8217;s not stocked at all, your user will be shown similar alternatives.</p>
<p>All you have to do is provide all your affiliate IDs!</p>
<h3>Support</h3>
<p>If you are having any problems with the script, please <a href="http://wordpress.org/extend/plugins/amazon-affiliate-link-localizer/faq/">read the FAQ</a> which solves most common enquiries.</p>
<h3>Non-Wordpress version</h3>
<p>If you want to achieve the same result on a non-Wordpress site, you can simply install the <a href="http://petewilliams.info/blog/2009/07/javascript-amazon-associate-link-localiser/">pure JavaScript version</a>. </p>
<h3>See also: Greasemonkey Script</h3>
<p>As an Amazon user, you may also be interested in my <a href="/blog/2009/09/amazon-link-localizer-greasemonkey-script/">Amazon Link Localizer Greasemonkey Script</a> which automatically converts links to international Amazon sites into links to your local Amazon site.</p>
<p>So if I link to a product on Amazon.co.uk, and you are a US visitor, you will get a link to that same product on Amazon.com instead.</p>
<h3>Updates</h3>
<p><a href="http://twitter.com/PeteWilliams">Follow me on Twitter</a> to be sure you hear about new updates.</p>
<h3>Donations</h3>
<p>If you find this plugin helpful and it&#8217;s increasing your sales. please consider <a href="http://petewilliams.info/donate">donating just $1</a> or more to say thanks for the many, many hours I&#8217;ve spent on it. I&#8217;d really appreciate it!</p>
<h3>Disclosure</h3>
<p>If you do not insert your own affiliate IDs the script will use mine. Hopefully this will help fund my book addiction!</p>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2009/09/amazon-affiliate-link-localizer-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>How to Speed Up Your Site and Get a YSlow Grade A</title>
		<link>http://petewilliams.info/blog/2009/08/speed-up-your-site-and-get-a-y-slow-grade-a/</link>
		<comments>http://petewilliams.info/blog/2009/08/speed-up-your-site-and-get-a-y-slow-grade-a/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 23:02:34 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[404s]]></category>
		<category><![CDATA[Add an Expires or a Cache-Control Header]]></category>
		<category><![CDATA[amalgamate]]></category>
		<category><![CDATA[Avoid CSS Expressions]]></category>
		<category><![CDATA[Avoid Redirects]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[combine javascript]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[concatenate]]></category>
		<category><![CDATA[Configure ETags]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css sprites]]></category>
		<category><![CDATA[cufon]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[entity tags]]></category>
		<category><![CDATA[ETags]]></category>
		<category><![CDATA[expires header]]></category>
		<category><![CDATA[filesize]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Flush the Buffer Early]]></category>
		<category><![CDATA[font replacement]]></category>
		<category><![CDATA[grade a]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[Gzip Components]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[HTTP requests]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[image compression]]></category>
		<category><![CDATA[image format]]></category>
		<category><![CDATA[image optimisation]]></category>
		<category><![CDATA[image optimization]]></category>
		<category><![CDATA[image replacement]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[improve performance]]></category>
		<category><![CDATA[increase performance]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[load speed]]></category>
		<category><![CDATA[load-balanced]]></category>
		<category><![CDATA[load-balancing]]></category>
		<category><![CDATA[loading]]></category>
		<category><![CDATA[long expire header]]></category>
		<category><![CDATA[Make Ajax Cacheable]]></category>
		<category><![CDATA[Make JavaScript and CSS External]]></category>
		<category><![CDATA[minification]]></category>
		<category><![CDATA[minify]]></category>
		<category><![CDATA[Minify JavaScript and CSS]]></category>
		<category><![CDATA[Minimize HTTP Requests]]></category>
		<category><![CDATA[Minimize the Number of iframes]]></category>
		<category><![CDATA[mod_deflate]]></category>
		<category><![CDATA[mod_gzip]]></category>
		<category><![CDATA[No 404s]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Post-load Components]]></category>
		<category><![CDATA[Preload Components]]></category>
		<category><![CDATA[Put Scripts at the Bottom]]></category>
		<category><![CDATA[Put Stylesheets at the Top]]></category>
		<category><![CDATA[reduce]]></category>
		<category><![CDATA[Reduce DNS Lookups]]></category>
		<category><![CDATA[reduce http requests]]></category>
		<category><![CDATA[Reduce the Number of DOM Elements]]></category>
		<category><![CDATA[Remove Duplicate Scripts]]></category>
		<category><![CDATA[sifr]]></category>
		<category><![CDATA[smush it]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[speed up]]></category>
		<category><![CDATA[Split Components Across Domains]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[sprites]]></category>
		<category><![CDATA[Use a Content Delivery Network]]></category>
		<category><![CDATA[Use GET for AJAX Requests]]></category>
		<category><![CDATA[xhtml]]></category>
		<category><![CDATA[y-slow]]></category>
		<category><![CDATA[yslow]]></category>
		<category><![CDATA[zip]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/?p=253</guid>
		<description><![CDATA[When I first launched <a href="/">my homepage</a> it earned a Grade F in Yahoo's <a href="http://developer.yahoo.com/yslow/">YSlow</a>. This post explains how I <strong>halved load time</strong> and achieved a Grade A.]]></description>
			<content:encoded><![CDATA[<p>When I first launched <a href="/">my homepage</a> it earned a Grade F in Yahoo&#8217;s <a href="http://developer.yahoo.com/yslow/">YSlow</a>. This post explains how I <strong>decreased load time</strong> and achieved a Grade A.</p>
<p>If you&#8217;re not familiar with it, <a href="http://developer.yahoo.com/yslow/">YSlow</a> is a Firefox Add-On that integrates with the indispensible <a href="http://www.getfirebug.com/">Firebug</a>. It measures page performance and provides suggestions on how to make improvements.</p>
<p>The key to improving the speed of you page is to not only <strong>reduce the amount of data</strong> that is sent to the client, but <strong>also the number of requests</strong> made to the server. Each time your browser makes an HTTP request from the server, time is wasted setting up a connection and waiting for a response, introducing further delays.</p>
<p>Originally, my homepage and all its assets &#8211; images, JavaScript and <acronym title="Cascading Style Sheets">CSS</acronym> files &#8211; weighed in at 196kb with a total of 46 <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests. It&#8217;s now down to 75kb with 16 requests and loads in half the time.</p>
<p>So here&#8217;s how you can <strong>improve your YSlow grade</strong>…</p>
<h3>Compress Images</h3>
<p><small>Saved me 18kb</small><br />
You probably already know you can reduce image filesizes by choosing the <strong>optimal file format</strong> and saving at the right quality level. What you might not know is that the resultant images can often been <strong>compressed further</strong> without any loss of quality.</p>
<p><a href="http://smush.it">Smush.it</a> is a <a href="http://en.wikipedia.org/wiki/Lossless">lossless compression</a> tool (now built into YSlow itself), which in a single click checks your site for any bloated images, compresses them and then pops them all in a handy zip file for you to download.</p>
<p>You&#8217;ll find Smush.it under the Tools menu in YSlow.</p>
<h3>Remove 404s</h3>
<p><small>Saved me 4kb and 2 HTTP requests</small><br />
Check Firebug&#8217;s Net tab for any red items, these are files which cannot be found. Here you&#8217;re wasting an HTTP request and downloading a 404 page you don&#8217;t need. I was surprised to see that I actually had a couple 404s from a Lytebox CSS file.</p>
<h3>Remove unused CSS</h3>
<p><small>Saved me 1kb</small><br />
Firefox add-on <A href="https://addons.mozilla.org/en-US/firefox/addons/policy/0/5392/57379?src=addondetail">Dust-Me Selectors</a> checks your pages for any CSS selectors which are declared in your CSS but not used by your HTML. Providing these aren&#8217;t used in any other pages, these can be removed to save bytes.</p>
<h3>Combine JavaScript and CSS files</h3>
<p><small>Saved me 4 HTTP requests</small><br />
If each of your pages use the same few JavaScript files, try combining them into a single file to remove unnecessary HTTP requests. You can do the same with your CSS files.</p>
<h3>Minify JavaScript and CSS</h3>
<p><small>Saved me 15kb</small><br />
Hopefully you write your CSS and JavaScript to be easy to read and maintain, with plenty of comments, verbose variable names and appropriate use of whitespace. However none of this is of any interest to browsers, so these can all be stripped out by a JavaScript minifier, saving crucial bytes.</p>
<p>Use the <a href="http://compressorrater.thruhere.net/">JavaScript Compressorator</a> to see how much you can save.<br />
There are a few CSS minifiers around, but I&#8217;ve found <a href="http://iceyboard.no-ip.org/projects/css_compressor">Robson&#8217;s CSS Compressor</a> to give the best results.</p>
<p>Be sure to <strong>keep the original uncompressed files</strong> for any further development. Name the minified file *.min.js or *.min.css and repoint your HTML files.</p>
<h3>Gzip Components</h3>
<p><small>Saved me 53kb</small><br />
<a href="http://en.wikipedia.org/wiki/gzip">Gzipping </a> your text-based assets (HTML, JavaScript and CSS) allows your webserver to transmit compressed versions of your files, often <strong>reducing the filesize by around 70%</strong>, and allow the users&#8217; browser to seamlessly unzip it and process it as normal. This is probably the quickest and most effective way to improve your site&#8217;s performance.</p>
<p>How you turn on gzip compression depends on what webserver you&#8217;re running. If it&#8217;s Apache 2, as is most common, then the easiest method it to add the following to your .htaccess file:</p>
<pre class="code">
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xhtml+xml
AddOutputFilterByType DEFLATE application/x-javascript application/javascript text/javascript text/css
</pre>
<p>If you&#8217;ve not got a .htacess file, simply add a text file called &#8216;.htaccess&#8217; at the root level of your site containing the above text.</p>
<p>To confirm your files are being gzipped, use Firebug to inspect your headers and look for &#8216;<em>content encoding: gzip</em>&#8216;.</p>
<h3>Create CSS Sprites</h3>
<p><small>Saved 14kb and 8 HTTP requests</small><br />
Images on a website can often be the <strong>biggest abuser of HTTP requests</strong>. <a href="http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/">CSS sprites</a> are a technique to reduce the number of requests necessary by <strong>combining multiple images</strong> into a single image and then using CSS&#8217;s background-position to position them.</p>
<p>To the user, everything looks the same, just a little bit faster.</p>
<p>This can also <strong>trim down the filesize</strong> a fair bit, especially if you combine images of the same format with similar colours. For instance the images accompanying the links in the sidebar to the right are from a <a href="http://img.petewilliams.info/links-blog.png">3kb CSS sprite</a>, but individually the images totalled 11kb.</p>
<h3>Use multiple Subdomains</h3>
<p><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.1.4">The HTTP specification</a> states that a browser can only download a <strong>maximum of 2 files from each domain</strong> at any one time. If all your files are on a single domain then your users will waste time queuing up downloads.</p>
<p>So once you&#8217;ve reduced your HTTP requests, try spreading them around. I&#8217;ve moved my JavaScript, CSS and image files onto <strong>separate subdomains</strong> allowing the user to make the most of their bandwidth.</p>
<h3>Add Expires Header</h3>
<p>YSlow suggests that you &#8216;Add Expires headers&#8217;, which basically is a note in the header telling the browser to <strong>cache the file</strong> until a specific date. It won&#8217;t then waste time looking to see if the file has changed until that date.</p>
<p>To implement a long expire header, add the following code to your .htaccess file:</p>
<pre class="code">
&lt;FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"&gt;
        ExpiresActive On
        ExpiresDefault "access plus 1 year"
&lt;/FilesMatch&gt;
</pre>
<p>This does however <strong>complicate maintenance</strong>. If you make a change to any of the affected files you&#8217;ll need to give it a new filename to prevent the cached version being used. I tend to put the last-modified date in the filename to avoid this.</p>
<h3>Configure Entity Tags</h3>
<p>Entity tags are used to check if the file in your cache is the same as the one on the server. Yahoo&#8217;s problem with them is that this doesn&#8217;t work if the site is server from a different server &#8211; as might happen on a <a href="http://en.wikipedia.org/wiki/Load_balancing_%28computing%29">load-balanced</a> site.</p>
<p>So for most of us, this isn&#8217;t really a problem that needs solving. If you want to keep YSlow happy though, you just need to add the following to your .htaccess file:</p>
<pre class="code">
FileETag none
</pre>
<h3>Image Replacement</h3>
<p><small>Saved 17kb and 12 HTTP requests</small><br />
Due to limited font support across the web, people often use images to display custom fonts. Along with the accessibility issues this presents, this also has the effect of increasing your page&#8217;s footprint. </p>
<p>A more accessible and maintainable solution is to use an <strong>image replacement technique</strong> such as <a href="http://www.mikeindustries.com/blog/sifr/">sIFR</a>, <a href="http://facelift.mawhorter.net/">FLIR</a> or <a href="http://wiki.github.com/sorccu/cufon/about">Cofun</a> to replicate a font.</p>
<p><strong>I prefer <a href="http://wiki.github.com/sorccu/cufon/about">Cufon</a></strong> for a variety of reasons, not least because it&#8217;s a purely JavaScript technique meaning it can be nicely minified, combined and compressed. The Cufon script and the JavaScript-encoded font used on this site come to around 12k &#8211; far less than the images they replaced and didn&#8217;t cost any extra HTTP requests.</p>
<h3>Prioritised Loading</h3>
<p>Once you&#8217;ve completed all the above steps, you can still make your website <em>appear</em> to load quicker.</p>
<p>Placing <strong>CSS at the top</strong> of the page allows pages to be displayed progressively as it loads.<br />
Place <strong>JavaScript at the bottom</strong> as it blocks the download of any other content.</p>
<h3>Backend Optimisation</h3>
<p>As well as improving the speed your content is transmitted, you can improve the speed it is generated. On anything but the most basic static HTML site, there will be some <strong>server-side programming</strong> and <strong>database access</strong> slowing down the delivery of your content. Be sure you don&#8217;t overlook any opportunities for optimisation here. </p>
<p>If you&#8217;re not a backend developer there are still opportunities for improvement, for example by installing a <a href="http://wordpress.org/extend/plugins/wp-super-cache/">caching plug-in</a> on WordPress.</p>
<h3>Conclusion</h3>
<p>I completed all the above steps mainly as a learning exercise and because I can&#8217;t resist the allure of getting a top grade in anything! However, some of the above &#8216;solutions&#8217; <strong>aren&#8217;t necessarily appropriate for every site</strong> &#8211; it&#8217;s up to you to assess how great the potential performance gains are and if they worth the overhead in maintenance.</p>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2009/08/speed-up-your-site-and-get-a-y-slow-grade-a/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Amazon Associate Link Localiser</title>
		<link>http://petewilliams.info/blog/2009/07/javascript-amazon-associate-link-localiser/</link>
		<comments>http://petewilliams.info/blog/2009/07/javascript-amazon-associate-link-localiser/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 22:26:10 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[affiliate]]></category>
		<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[affiliates]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[associate]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[improve referrals]]></category>
		<category><![CDATA[improve sales]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[referral]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/?p=214</guid>
		<description><![CDATA[This script ensures that your Amazon links take your international visitors to their local Amazon site, rather than yours! You'll never lose a referral sale again, as the script automatically inserts your Amazon Associate ID for the appropriate international Amazon site.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been a member of <a href="https://affiliate-program.amazon.co.uk/">Amazon&#8217;s Associate program</a> for a number of years and have posted affiliate links to books discussed on this very blog. The program means that by putting my affiliate ID into any links to Amazon products, I receive a small referral fee.</p>
<p>I&#8217;ve always linked to <a href="http://www.amazon.co.uk">Amazon.co.uk</a> as that&#8217;s <em>my</em> local Amazon store, but of course that&#8217;s not necessarily true for my visitors &#8211; or yours&#8230;</p>
<p>To solve this problem, I&#8217;ve written some JavaScript and a little bit of PHP which will convert any Amazon links on your page into affiliated links to your visitor&#8217;s local Amazon store. So US visitors will get a .com link, whilst UK visitors will get a .co.uk link to the same product.</p>
<h3>Download</h3>
<ul>
<li><a href="http://uploads.petewilliams.info/amazon-localiser.zip" onclick="pageTracker._trackPageview( 'amazon-localiser.zip' );">amazon-localiser.zip</a> 4 kb</li>
</ul>
<h3>Setup</h3>
<p>Edit amazon-localiser.js to insert your regional Associate IDs into the array at the top, for example:</p>
<pre class="code">
var arrAffiliates = {
	'co.uk' : 'petewill-19',
	'com'	: 'petewill-20',
	'de'	: 'petewill05-21',
	'fr'	: 'petewill-21',
	'ca'	: 'petewill00-20',
	'jp'	: '',
	'it'	: petewill04-21',
	'cn'	: petewill-23',
	'es'	: petewill0d4-21'
};
</pre>
<p>If you do not have an ID for each country, you can just leave them blank, as above for .jp.</p>
<p>In most cases, you will also need to set the path to amazon-localiser.php, for example:</p>
<pre class="code">
var strUrlAjax = '/inc/amazon-localiser.php';
</pre>
<h3>Upload and Embed</h3>
<p>As well as linking to amazon-localiser.js you need to link to the Google JS API file (5 kb) or the script will not work. Insert the following code just before your &lt;/body&gt; tag:</p>
<pre class="code">
&lt;script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="amazon-localiser.js"&gt;&lt;/script&gt;
</pre>
<p>Upload your modified amazon-localiser.js file, and make sure the above link points to the right location.</p>
<h3>Usage</h3>
<p>That&#8217;s it &#8211; job done! You can now just link to any product on any Amazon site with a normal, unaffiliated link and your users will get one affiliated for their country. Initially, the script looks for a product with the same product ID as the one in your link, but if it can&#8217;t find one on the user&#8217;s local store, it will link to a search results page searching for the name of your product. This means that it will still be found even if international versions have different product IDs, and if it&#8217;s not stocked at all, your user will be shown similar alternatives.</p>
<h3>Example</h3>
<p>The script is running on this page, so hopefully <a href="http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758/">this example</a> should be affiliated specially for you!</p>
<h3>Updates</h3>
<p><a href="http://twitter.com/PeteWilliams">Follow me on Twitter</a> to be sure you hear about new updates.</p>
<h3>Donations</h2>
<p>If you find this plugin helpful and itâ€™s increasing your sales. please consider <a href="http://petewilliams.info/donate">donating just $1</a> or more to say thanks for the many, many hours Iâ€™ve spent on it. Iâ€™d really appreciate it!</p>
<h3>Disclosure</h3>
<p>If you do not insert your own affiliate IDs the script will use mine. Hopefully this will help fund my book addiction!</p>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2009/07/javascript-amazon-associate-link-localiser/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Writing for the Web &#8211; Keep It Simple, Stupid!</title>
		<link>http://petewilliams.info/blog/2009/06/writing-for-the-web-keep-it-simple-stupid/</link>
		<comments>http://petewilliams.info/blog/2009/06/writing-for-the-web-keep-it-simple-stupid/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 22:58:11 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[first direct]]></category>
		<category><![CDATA[keep it short and sweet]]></category>
		<category><![CDATA[keep it simple stupid]]></category>
		<category><![CDATA[kiss]]></category>
		<category><![CDATA[kiss principle]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[online banking]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[simplicity]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[ux]]></category>
		<category><![CDATA[web writing]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[writing for the web]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/?p=194</guid>
		<description><![CDATA[You might have heard of the <a href="http://en.wikipedia.org/wiki/Keep_It_Simple,_Stupid"><acronym title="Keep It Simple, Stupid">KISS</acronym> principle</a> which stands for "Keep It Simple, Stupid!"

The idea is, rather appropriately, quite simple - <strong>design things to be as simple as possible to avoid confusing people</strong>. This can be applied to anything - interface design, programming, and indeed your copy - though Internet bank first direct seem not to be aware of this...]]></description>
			<content:encoded><![CDATA[<p>You might have heard of the <a href="http://en.wikipedia.org/wiki/Keep_It_Simple,_Stupid"><acronym title="Keep It Simple, Stupid">KISS</acronym> principle</a> which stands for &#8220;<em>Keep It Simple, Stupid!</em>&#8221;</p>
<p>The idea is, rather appropriately, quite simple &#8211; <strong>design things to be as simple as possible to avoid confusing people</strong>. This can be applied to anything &#8211; interface design, programming, and indeed your copy.</p>
<p>In an earlier post, <a href="http://petewilliams.info/blog/2009/02/the-less-you-say-the-more-we-listen/">The Less you Say, the More we Listen</a>, I suggested keeping your copy <strong>short and sweet</strong>. That&#8217;s one way of keeping it simple, another is to use simple language that all your audience can understand. in fact, it&#8217;s even a <a href="http://www.w3.org/TR/WCAG10/wai-pageauth.html#gl-facilitate-comprehension"><acronym title="Web Content Accessibility Guidelines">WCAG</acronym> Guideline</a>.</p>
<div id="attachment_251" class="wp-caption alignright" style="width: 285px"><img src="http://petewilliams.info/blog/wp-content/uploads/2009/06/firstdirect2.png" alt="Overly-complex language confuses users" title="firstdirect2" width="275" height="204" class="size-full wp-image-251" /><p class="wp-caption-text">Overly-complex language confuses users</p></div>
<p>Opposite is an example of <a href="http://www.firstdirect.com">first direct</a> failing to do this. To log in to your online banking account it asks you to enter your &#8216;<strong><em>1st, 5th, and penultimate</em></strong>&#8216; characters.</p>
<p>Do they <em>really</em> expect that every single customer knows what &#8216;<strong><em>penultimate</em></strong>&#8216; means? Have they tested that? What&#8217;s wrong with just saying the &#8216;<em>8th character</em>&#8216;, or the &#8216;<em>last but one character</em>&#8216;?</p>
<p>On the plus side they have followed one guideline for writing for the web &#8211; they&#8217;ve used <a href="http://www.useit.com/alertbox/writing-numbers.html">numerals for numbers</a> which makes it easier to pick out the required characters at a glance.</p>
<p>But of course, that that&#8217;s much use if people don&#8217;t know what the other character they&#8217;re meant to be entering is&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2009/06/writing-for-the-web-keep-it-simple-stupid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designers &#8211; Leave the interface elements alone!</title>
		<link>http://petewilliams.info/blog/2009/06/designers-leave-the-interface-elements-alone/</link>
		<comments>http://petewilliams.info/blog/2009/06/designers-leave-the-interface-elements-alone/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 21:30:55 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[affordance]]></category>
		<category><![CDATA[Close]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[controls]]></category>
		<category><![CDATA[CS4]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[Fitss' Law]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[interaction design]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[Jacob Nielson]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Menu]]></category>
		<category><![CDATA[metaphor]]></category>
		<category><![CDATA[metaphors]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[physical metaphor]]></category>
		<category><![CDATA[scroll bars]]></category>
		<category><![CDATA[scrollbars]]></category>
		<category><![CDATA[standard]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[Steve Krug]]></category>
		<category><![CDATA[tab]]></category>
		<category><![CDATA[tabs]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[usablity]]></category>
		<category><![CDATA[user experience]]></category>
		<category><![CDATA[ux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/?p=113</guid>
		<description><![CDATA[Most desktop applications make heavy use of standardised <acronym title="Graphic User Interface">GUI</acronym> components such as drop-down menus, tabs, and buttons. Some applications, often web applications, try something different... and fail.

Here we look at the science behind seemingly straight-forward interface controls to see why there's more to them than first appears. More importantly we look at why you should leave them alone!]]></description>
			<content:encoded><![CDATA[<p>Most desktop applications make heavy use of standardised <acronym title="Graphic User Interface">GUI</acronym> components such as drop-down menus, tabs, and buttons. Some applications, often web applications, try something different&hellip; and fail.</p>
<p>Flash scrollbars are a <a href="http://www.useit.com/alertbox/20050711.html">classic example</a></p>
<p>Here&#8217;s why you should stick to the standards:</p>
<ul>
<li><strong>Familiarity</strong> &#8211; people are used to, and expect these consistent elements in applications. They already know how they work and will be frustrated if yours don&#8217;t work in the same way.</li>
<li><strong>Free research!</strong> &#8211; You&#8217;ll probably find that the original elements underwent much experimentation, analysis and research until an optimum was found. This is all yours for free with the standard element!</li>
</ul>
<p>As such, it&#8217;s important not to bastardise these elements without understanding the thought process behind them. Let&#8217;s take a look at some examples&#8230;</p>
<h3>Tabs</h3>
<div id="attachment_144" class="wp-caption alignright" style="width: 174px"><img class="size-full wp-image-144" title="Good Tabs" src="http://petewilliams.info/blog/wp-content/uploads/2009/04/good_tabs.png" alt="Windows Vista's standard tab interface shows correct tab usage." width="164" height="39" /><p class="wp-caption-text">Vista&#39;s standard tab interface shows correct tab usage.</p></div>
<p>Tabs are a great interface control &#8211; they provide a mechanism to make extra information easily available without overloading the user. When used correctly, as per the standard Windows <em>(see right)</em> and Mac controls they also create a great <a href="http://www.katalinszabo.com/metaphor.htm">physical metaphor</a> &#8211; new users can relate the interface to traditional paper tabs and know what to expect.</p>
<p>What often happens when people mess with tabs, is that they they <strong>break that metaphor</strong>. For tabs to work, they need to be a different colour when selected, and that colour should be the same as the page displayed below. Just as they would with paper tabs.</p>
<div id="attachment_149" class="wp-caption alignright" style="width: 176px"><img class="size-full wp-image-149" title="Bad tabs" src="http://petewilliams.info/blog/wp-content/uploads/2009/04/bad_tabs.png" alt="A poor web implementation of tabs." width="166" height="60" /><p class="wp-caption-text">A poor web implementation of tabs.</p></div>
<p>The image to the right shows an example where the designers have not thought about this metaphor and as a result have produced less usable tabs. They have lost the <a href="http://www.jnd.org/dn.mss/affordance_conv.html">affordance</a> of tabs &#8211; it&#8217;s no longer clear what is selected, nor what clicking the tabs will do.</p>
<p>Someone at IBM put a lot of thought into how tabs would work best &#8211; let&#8217;s not put it to waste by thinking we know better, not until you understand the though process behind the design.</p>
<p>See Steve Krug&#8217;s &#8220;<a href="http://www.amazon.co.uk/exec/obidos/ASIN/0321344758/pcrev05">Don&#8217;t Make Me Think</a>&#8221; for more detail on the correct design of tab controls.</p>
<h3>Scroll Bars</h3>
<div id="attachment_161" class="wp-caption alignright" style="width: 212px"><img class="size-full wp-image-161" title="bad_scroll_bars" src="http://petewilliams.info/blog/wp-content/uploads/2009/04/bad_scroll_bars.png" alt="No honestly, that is a scrollbar!" width="202" height="273" /><p class="wp-caption-text">No honestly, that is an actual scrollbar!</p></div>
<p>Time and time after again we see designers, often of Flash sites, try and reinvent the scroll bar. Not once have I seen anyone offer an improvement over the standard. As well as the risk that users won&#8217;t recognise or understand your scroll bar, they ignore what makes the standard element so good:</p>
<ul>
<li><strong>Recognisable</strong> scroll buttons with arrows pointing in direction of movement</li>
<li>The slider (or &#8216;thumb&#8217;) gets larger when you have less to scroll, providing a <strong>larger target</strong> when less accuracy is required</li>
<li>Clicking in the trough <strong>jumps</strong> the content up or down</li>
<li>Holding down the mouse makes it scroll <strong>faster</strong></li>
<li>It works <strong>horizontally or vertically</strong></li>
<li>Only <strong>appears when required</strong></li>
<li>Works with mouse <strong>scroll wheels</strong></li>
</ul>
<p>I&#8217;ve seen all these rules broken simply because the designers wanted something <em>looking different</em>. It gets worse still when they try and make them <em>behave differently</em>, such as those that scroll on hover, instead of on click.</p>
<p>The example to the right, is possibly the worst scrollbar I&#8217;ve come across. So much so that you might struggle to spot it. The plus and minus sign along with the bullet points actually form a disjointed scrollbar. If you hover over plus or minus the content moves vertically within it&#8217;s box. If you click a bullet it scrolls to specific points. Clicking or hovering anywhere else does nothing. What makes it worse is that this is a small part of the page not a whole screen, so there&#8217;s not even the expectation that it might scroll!</p>
<h3>Application Close Button</h3>
<div id="attachment_132" class="wp-caption alignright" style="width: 212px"><img class="size-full wp-image-132" title="cs4" src="http://petewilliams.info/blog/wp-content/uploads/2009/04/cs4.png" alt="Photoshop CS4's non-standard close/resize buttons" width="202" height="117" /><p class="wp-caption-text">Photoshop CS4&#39;s non-standard close/resize buttons</p></div>
<p>Here&#8217;s the problem that prompted me to write this post in the first place &#8211; Photoshop CS4&#8242;s close button.</p>
<p>You might be thinking there&#8217;s not much to go wrong with that little buttons in the top right of your screen, but therein lies the important factor &#8211; they need to be <strong>at the top right</strong>, the <em>very</em> top right!</p>
<p>The top right corner is one of the easiest places on the screen to reach &#8211; you can get there in an instant with just a blind fling of your mouse. Move the button just a coupe pixels in from that corner and you lose this &#8211; as Abode have done. Worse still, they&#8217;ve made the button smaller which makes it harder to use, as <a href="http://en.wikipedia.org/wiki/Fitts_law">Fitts&#8217; Law</a> explains:</p>
<blockquote><p>The time required to move to a target area is a function of the <strong>distance</strong> to and the <strong>size of</strong> the target.</p></blockquote>
<p>The edges of your screen are effectively of an infinite depth &#8211; however far your arm moves the mouse, the cursor stays at the edge. Therefore they represent the biggest click targets and are prime real estate for common functions.</p>
<p>The positioning of the standard close button is no coincidence. As we&#8217;ve found, there&#8217;s science and research behind all successful interface design, despite the fact that it may not seem immediately obvious. As such, unless you&#8217;ve got a genuine reason not to, <strong>please leave the interface elements alone!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2009/06/designers-leave-the-interface-elements-alone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Ticketmaster User Experience Rant!</title>
		<link>http://petewilliams.info/blog/2009/03/a-ticketmaster-user-experience-rant/</link>
		<comments>http://petewilliams.info/blog/2009/03/a-ticketmaster-user-experience-rant/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 08:03:44 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[buying]]></category>
		<category><![CDATA[checkout]]></category>
		<category><![CDATA[complaint]]></category>
		<category><![CDATA[concert]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[jackson]]></category>
		<category><![CDATA[michael jackson]]></category>
		<category><![CDATA[online buying]]></category>
		<category><![CDATA[poor]]></category>
		<category><![CDATA[purchase process]]></category>
		<category><![CDATA[purchase workflow]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[selling]]></category>
		<category><![CDATA[ticket master]]></category>
		<category><![CDATA[ticketing]]></category>
		<category><![CDATA[ticketmaster]]></category>
		<category><![CDATA[tickets]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[user experience]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/2009/03/a-ticketmaster-user-experience-rant/</guid>
		<description><![CDATA[The Ticketmaster/Michael Jackson fiasco form a UX perspective.]]></description>
			<content:encoded><![CDATA[<p>Did anyone else waste hours of their life failing to buy Michael Jackson tickets?</p>
<p>For those of you who didn&#8217;t, the experience went like this:</p>
<ol>
<li>Go to Ticketmaster website and click Michael Jackson promo</li>
<li>View a list of 50 dates at the same venue and choose one</li>
<li>Wait 5 minutes for a page to load then select number of tickets</li>
<li>Wait 15-30 minutes for a page to load saying there are no tickets available</li>
<li>Return to step 2 and select a different date</li>
<li>Repeat until you hear on the radio that all tickets are gone</li>
<li>Leave Ticketmaster website and hope you never have to come back again</li>
</ol>
<p>Now why oh why, could I not have just said that I want Michael Jackson tickets &#8211; and I don&#8217;t care when for &#8211; and then have it find me a date with tickets available?</p>
<p>You&#8217;d have thought a company so universally detested for their extortionate fees might prioritise a decent user experience in order to claw back some goodwill, but apparently not&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2009/03/a-ticketmaster-user-experience-rant/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The less you say, the more we listen</title>
		<link>http://petewilliams.info/blog/2009/02/the-less-you-say-the-more-we-listen/</link>
		<comments>http://petewilliams.info/blog/2009/02/the-less-you-say-the-more-we-listen/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 23:18:09 +0000</pubDate>
		<dc:creator>Pete Williams</dc:creator>
				<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[attention]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[copy for the web]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[web copy]]></category>
		<category><![CDATA[web writing]]></category>
		<category><![CDATA[writing for the web]]></category>

		<guid isPermaLink="false">http://petewilliams.info/blog/?p=50</guid>
		<description><![CDATA[I'm going to keep this brief because you're probably not going to read it all anyway. In fact, that's my point - web users don't read, they scan. <a href="http://petewilliams.info/blog/2009/02/the-less-you-say-the-more-we-listen/">So make your copy count</a>.]]></description>
			<content:encoded><![CDATA[<p><img src="http://petewilliams.info/blog/wp-content/uploads/2009/02/eyetracking.jpg" alt="eye tracking heatmap" title="eye tracking heatmap" width="194" height="347" class="alignright size-full wp-image-85" /></p>
<h3>The Problem</h3>
<p>I&#8217;ll keep this brief because you&#8217;re probably not going to read it all anyway. In fact, that&#8217;s my point &#8211; web users don&#8217;t read, they scan.</p>
<p>The adjacent heatmap shows eye activity on a typical product page. This is fairly normal behaviour and displays what Nielson calls <a href="http://www.useit.com/alertbox/reading_pattern.html" target="_blank">F Pattern</a> reading, after the shape the eyes follow on the page.</p>
<h3>The Solutions</h3>
<p>So if they&#8217;re not going to read it all, make sure they read what you want them to &#8211; lose everything else.</p>
<ul class="spaced">
<li>Steve Krug&#8217;s advice in <a href="http://www.amazon.co.uk/exec/obidos/ASIN/0321344758/pcrev05" title="Steve Krug's Don't Make Me Think">his book</a> is &#8220;lose half your words, then lose half of what&#8217;s left&#8221;. I&#8217;d say that&#8217;s a good start. Just keep taking out words until every last one is vital</li>
<li><strong>Front-load your text</strong> &#8211; Put the important stuff at the beginning, because people probably won&#8217;t get to the end. Screen-reader users especially will skip content if the start isn&#8217;t engaging</li>
<li><strong>Formatting</strong> &#8211; Headers, bullet lists and bolding help direct the eye to the important places and are easier to read that large text blocks</li>
<li><strong>Practice on <a href="http://twitter.com/PeteWilliams" target="_blank">twitter</a></strong> &#8211; the 140 character limit should help!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://petewilliams.info/blog/2009/02/the-less-you-say-the-more-we-listen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

