<?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>Web Developer 2.0 &#187; optimisation</title>
	<atom:link href="http://webdeveloper2.com/tag/optimisation/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdeveloper2.com</link>
	<description>A blog about web design and development, tools, techniques, products and relevant news.</description>
	<lastBuildDate>Thu, 09 Sep 2010 00:55:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
<cloud domain='webdeveloper2.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Handy WordPress hack &#8211; changing javascript library location</title>
		<link>http://webdeveloper2.com/2009/04/handy-wordpress-hack-changing-javascript-library-location/</link>
		<comments>http://webdeveloper2.com/2009/04/handy-wordpress-hack-changing-javascript-library-location/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 08:00:23 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Lab]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://webdeveloper2.com/?p=1017</guid>
		<description><![CDATA[Here&#8217;s a little hack I worked out to solve a dilemma that didn&#8217;t appear to be particularly well documented. My problem was that I needed to use jQuery 1.3 for some script but the default version in WordPress 2.7 is v1.2.6. It also makes sense to load the library from a common source such as [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little hack I worked out to solve a dilemma that didn&#8217;t appear to be particularly well documented.</p>
<p>My problem was that I needed to use <a href="http://jquery.com/">jQuery 1.3</a> for some script but the default version in WordPress 2.7 is v1.2.6. It also makes sense to load the library from a common source such as the Google Ajax Libraries API store which increases the chances of the site visitor already having a cached version of that file in their browser (decreasing the page load cost and consequently the page load time). Simply adding the script tag to the page header works, but any plugins or other WordPress functions which require jQuery will load the default copy of jQuery in addition to the one that you have added.</p>
<h2>Get a handle on it</h2>
<p>After digging around in the <a href="http://codex.wordpress.org">WordPress Codex</a> and some other helpful blogs I managed to get to grips with the in-built system for loading javascript files.</p>
<p>The way it works is that WordPress registers script libraries against defined <em>&#8216;handles&#8217;</em>. In this example I&#8217;m replacing the default registration for the <em>jquery</em> handle with version 1.3.2 loaded from the Google Ajax Libraries API store.</p>
<p>In my Theme Functions script (<em>functions.php</em>) I added these two simple lines of code.</p>
<pre class="brush: php;">
wp_deregister_script( 'jquery' ); 
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2' ); 
</pre>
<p><strong>wp_deregister_script</strong> drops the default script location for the jQuery library and releases the &#8216;jquery&#8217; handle. <strong>wp_register_script</strong> assigns a new script location to the jquery handle. this function has no effect if the handle being used is already registered, hence the use of wp_deregister_script beforehand.</p>
<p>Now anything which uses the Jquery library as a dependancy will use the new version (providing it has been coded using the <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">wp_enqueue_script</a> function) e.g.<br />
to load a jquery plugin in a theme template file such as the page header use:</p>
<pre class="brush: php;">
&lt;?php wp_enqueue_script(&quot;jqueryplugin&quot;, &quot;/wp-content/themes/mytheme/jqueryplugin.js&quot;, array(&quot;jquery&quot;),&quot;1.0&quot;); ?&gt;
</pre>
<p>this will result in the page output:</p>
<pre class="brush: xml;">
&lt;script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='http://mydomain/wp-content/themes/mytheme/jqueryplugin.js?ver=1.0'&gt;&lt;/script&gt;
</pre>
<p>This example only replaces the jquery definition, WordPress includes <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_scripts_included_with_WordPress">a number of common javascript libraries</a>, many of which could benefit from this treatment.</p>
<h2>Warning Note</h2>
<p>Replacing the default version of a Javascript library could lead to errors in other scripts which depend on that library &#8211; always test thoroughly.<br />
The default WordPress script loads jQuery in compatibility mode, to use jQuery alongside other libraries, you will need to <a href="http://docs.jquery.com/Using_jQuery_with_Other_Libraries">adjust your scripts to enable compatibility</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloper2.com/2009/04/handy-wordpress-hack-changing-javascript-library-location/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Content optimisation rant</title>
		<link>http://webdeveloper2.com/2007/11/content-optimisation-rant/</link>
		<comments>http://webdeveloper2.com/2007/11/content-optimisation-rant/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 16:51:00 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Content]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[publishing basics]]></category>

		<guid isPermaLink="false">http://techn0tic.wordpress.com/2007/11/26/content-optimisation-rant/</guid>
		<description><![CDATA[I&#8217;m writing this post whilst waiting for a 63 Mb image embedded into a webpage to be displayed &#8211; so that I can replace it with a smaller version. I find it hard to believe that these sort of fundamental mistakes are still being made. Is this one of those things that we used to [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Happy Thanksgiving" href="http://www.flickr.com/photos/74099591@N00/2054691327/"><img style="margin:0 5px 5px 0;" src="http://static.flickr.com/2404/2054691327_2a28b192a5_t.jpg" border="0" alt="Clueless" align="left" /></a>I&#8217;m writing this post whilst waiting for a 63 Mb image embedded into a webpage to be displayed &#8211; so that I can replace it with a smaller version. I find it hard to believe that these sort of fundamental mistakes are still being made. Is this one of those things that we used to learn the hard way but now gets skipped over as &#8220;web publishing basics&#8221;?. Is it assumed that anybody who can update their Myspace profile knows the technicalities and pitfalls of linked media? &#8211; It certainly looks that way to me.</p>
<p>In short, one of the most effective techniques for optimising your website is the rarely used and often overlooked method known as: &#8220;<strong>Having a clue what you&#8217;re doing</strong>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloper2.com/2007/11/content-optimisation-rant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why SEO is the new religion</title>
		<link>http://webdeveloper2.com/2006/12/why-seo-is-the-new-religion/</link>
		<comments>http://webdeveloper2.com/2006/12/why-seo-is-the-new-religion/#comments</comments>
		<pubDate>Sat, 23 Dec 2006 03:14:00 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://techn0tic.wordpress.com/2006/12/23/why-seo-is-the-new-religion/</guid>
		<description><![CDATA[I don&#8217;t know why, but something I read recently on an SEO blog got me thinking about the concepts behind working in Search Engine Optimisation. The exact algorithms used by major search engines are closely guarded secrets so a lot of the techniques used SEO practitioners are based on assumptions made by experimentation. Much of [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know why, but something I read recently on an <abbr title="Search Engine Optimisation">SEO</abbr> blog got me thinking about the concepts behind working in Search Engine Optimisation.</p>
<p>The exact algorithms used by major search engines are closely guarded secrets so a lot of the techniques used  <abbr>SEO</abbr> practitioners are based on assumptions made by experimentation. Much of the blogging done about SEO makes much use of phrases such as &#8220;I believe that..&#8221; and &#8220;In my opinion&#8230;&#8221;. So like religion, much of <abbr>SEO</abbr> depends on a person&#8217;s faith in the effectiveness of certain techniques.</p>
<p>Additionally there are &#8220;Churches&#8221;, the collective belief in a particular set of tenets. The two main ones being so-called &#8220;White Hat&#8221; and &#8220;Black Hat&#8221; SEO. Like most religions, there are smaller breakaway factions who choose to follow only a part of the tenets of the larger churches. Some of these have also begun to adopt their own coloured hats too.</p>
<p>I think it&#8217;s an interesting insight into human nature that we act this way. The old religions are based on people trying to find reason for the age old questions of life and death because there&#8217;s no user manual to say &#8220;this is why you&#8217;re here&#8221;. The new religions of <abbr>SEO</abbr> are based on people trying to find reasons for why their blog only comes in at number 46 on <a href="http://www.google.com/">Google</a> for searches on &#8220;pink waistcoats&#8221; because there&#8217;s no manual to say &#8220;50 inbound links from pagerank 5 sites will increase your pagerank by 1&#8243;.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloper2.com/2006/12/why-seo-is-the-new-religion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: webdeveloper2.com @ 2010-09-10 20:19:23 by W3 Total Cache -->