<?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>Simply Excited - Technology, Outdoor and Design &#187; Javascript</title>
	<atom:link href="http://scoop.simplyexcited.co.uk/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://scoop.simplyexcited.co.uk</link>
	<description>Technology, Design and Outdoor</description>
	<lastBuildDate>Fri, 23 Dec 2011 11:33:22 +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>HTML5 Inside &#8211; Geolocation</title>
		<link>http://scoop.simplyexcited.co.uk/2010/08/14/html5-inside-geolocation/</link>
		<comments>http://scoop.simplyexcited.co.uk/2010/08/14/html5-inside-geolocation/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 09:39:50 +0000</pubDate>
		<dc:creator>pyrat</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://scoop.simplyexcited.co.uk/2010/08/14/html5-inside-geolocation/</guid>
		<description><![CDATA[	
GPS tracking used in World Champs Orienteering

	In this series I am going to write about the new whizz bang things which fall under the HTML5 umbrella. I am going to attempt to find out whether it is &#8216;hype or hardcore&#8217;.

	Geolocation

	Geolocation is the art of finding out where a user is. This can be as rough [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://scoop.simplyexcited.co.uk/wp-content/uploads/2010/08/gps_orienteering.jpg" alt="Gps in orienteering" border="0" /><br />
<strong><span class="caps">GPS</span> tracking used in World Champs Orienteering</strong></p>

	<p>In this series I am going to write about the new whizz bang things which fall under the <span class="caps">HTML5</span> umbrella. I am going to attempt to find out whether it is &#8216;hype or hardcore&#8217;.</p>

	<h2>Geolocation</h2>

	<p>Geolocation is the art of finding out where a user is. This can be as rough as country, or as fine grained as an exact latitude / longitude coordinate set.</p>

	<p>Traditionally geolocation in the browser consisted of querying the user&#8217;s IP again a database. Usually this allowed you to find out what city a user was in. Nowadays, there is a geolocation <span class="caps">API</span> which is targetted specifically toward Mobile devices.</p>

	<p>The <span class="caps">W3C</span> has an <a href="http://dev.w3.org/geo/api/spec-source.html" title="">api for geolocation</a> which is in draft stage at the time of writing.</p>

	<p>Modern versions of Firefox, Chrome, Safari and Opera offer geolocation support. As far as I am aware all of these browsers actually implement the geolocation by querying a service provided by google. The google gears (deprecated) <a href="http://code.google.com/apis/gears/api_geolocation.html" title="">geolocation api</a> has been natively implemented by the major browsers.</p>

	<h2>How does the actual geolocation work?</h2>

	<p>Note: The <span class="caps">API </span>Described is the old gears <span class="caps">API</span> but as <span class="caps">HTML </span>Geolocation currently uses this it should be seen to be relatively similar.</p>

	<p>An <span class="caps">HTTP POST</span> is made containing <span class="caps">JSON</span> data which looks like the following.</p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="javascript">  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #3366CC;">&quot;version&quot;</span>: <span style="color: #3366CC;">&quot;1.1.0&quot;</span>,
    <span style="color: #3366CC;">&quot;host&quot;</span>: <span style="color: #3366CC;">&quot;maps.google.com&quot;</span>,
    <span style="color: #3366CC;">&quot;home_mobile_country_code&quot;</span>: <span style="color: #CC0000;">310</span>,
    <span style="color: #3366CC;">&quot;home_mobile_network_code&quot;</span>: <span style="color: #CC0000;">410</span>,
    <span style="color: #3366CC;">&quot;radio_type&quot;</span>: <span style="color: #3366CC;">&quot;gsm&quot;</span>,
    <span style="color: #3366CC;">&quot;carrier&quot;</span>: <span style="color: #3366CC;">&quot;Vodafone&quot;</span>,
    <span style="color: #3366CC;">&quot;request_address&quot;</span>: <span style="color: #003366; font-weight: bold;">true</span>,
    <span style="color: #3366CC;">&quot;address_language&quot;</span>: <span style="color: #3366CC;">&quot;en_GB&quot;</span>,
    <span style="color: #3366CC;">&quot;location&quot;</span>: <span style="color: #66cc66;">&#123;</span>
      <span style="color: #3366CC;">&quot;latitude&quot;</span>: <span style="color: #CC0000;">51.0</span>,
      <span style="color: #3366CC;">&quot;longitude&quot;</span>: <span style="color: #CC0000;">-0.1</span>
    <span style="color: #66cc66;">&#125;</span>,
    <span style="color: #3366CC;">&quot;cell_towers&quot;</span>: <span style="color: #66cc66;">&#91;</span>
      <span style="color: #66cc66;">&#123;</span>
        <span style="color: #3366CC;">&quot;cell_id&quot;</span>: <span style="color: #3366CC;">&quot;42&quot;</span>,
        <span style="color: #3366CC;">&quot;location_area_code&quot;</span>: <span style="color: #CC0000;">415</span>,
        <span style="color: #3366CC;">&quot;mobile_country_code&quot;</span>: <span style="color: #CC0000;">310</span>,
        <span style="color: #3366CC;">&quot;mobile_network_code&quot;</span>: <span style="color: #CC0000;">410</span>,
        <span style="color: #3366CC;">&quot;age&quot;</span>: <span style="color: #CC0000;">0</span>,
        <span style="color: #3366CC;">&quot;signal_strength&quot;</span>: <span style="color: #CC0000;">-60</span>,
        <span style="color: #3366CC;">&quot;timing_advance&quot;</span>: <span style="color: #CC0000;">5555</span>
      <span style="color: #66cc66;">&#125;</span>,
      <span style="color: #66cc66;">&#123;</span>
        <span style="color: #3366CC;">&quot;cell_id&quot;</span>: <span style="color: #3366CC;">&quot;88&quot;</span>,
        <span style="color: #3366CC;">&quot;location_area_code&quot;</span>: <span style="color: #CC0000;">415</span>,
        <span style="color: #3366CC;">&quot;mobile_country_code&quot;</span>: <span style="color: #CC0000;">310</span>,
        <span style="color: #3366CC;">&quot;mobile_network_code&quot;</span>: <span style="color: #CC0000;">580</span>,
        <span style="color: #3366CC;">&quot;age&quot;</span>: <span style="color: #CC0000;">0</span>,
        <span style="color: #3366CC;">&quot;signal_strength&quot;</span>: <span style="color: #CC0000;">-70</span>,
        <span style="color: #3366CC;">&quot;timing_advance&quot;</span>: <span style="color: #CC0000;">7777</span>
      <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#93;</span>,
    <span style="color: #3366CC;">&quot;wifi_towers&quot;</span>: <span style="color: #66cc66;">&#91;</span>
      <span style="color: #66cc66;">&#123;</span>
        <span style="color: #3366CC;">&quot;mac_address&quot;</span>: <span style="color: #3366CC;">&quot;01-23-45-67-89-ab&quot;</span>,
        <span style="color: #3366CC;">&quot;signal_strength&quot;</span>: <span style="color: #CC0000;">8</span>,
        <span style="color: #3366CC;">&quot;age&quot;</span>: <span style="color: #CC0000;">0</span>
      <span style="color: #66cc66;">&#125;</span>,
      <span style="color: #66cc66;">&#123;</span>
        <span style="color: #3366CC;">&quot;mac_address&quot;</span>: <span style="color: #3366CC;">&quot;01-23-45-67-89-ac&quot;</span>,
        <span style="color: #3366CC;">&quot;signal_strength&quot;</span>: <span style="color: #CC0000;">4</span>,
        <span style="color: #3366CC;">&quot;age&quot;</span>: <span style="color: #CC0000;">0</span>
      <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#125;</span></pre></div></div>
</p>



	<p>It has been designed to work with both mobile and wifi_enabled devices. The browser implementations map to native APIs on the device. So either a simple Lat/Lng is submitted potentially obtained from <span class="caps">GPS </span>(easy for google) or wifi_tower mac_addresses, or cell_tower information. Google can use this information to try to geocode a location.</p>

	<p>The response is also in <span class="caps">JSON</span>. We love <span class="caps">JSON</span> here at simplyexcited, <span class="caps">XML</span> is dirty.</p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="javascript">  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #3366CC;">&quot;location&quot;</span>: <span style="color: #66cc66;">&#123;</span>
      <span style="color: #3366CC;">&quot;latitude&quot;</span>: <span style="color: #CC0000;">51.0</span>,
      <span style="color: #3366CC;">&quot;longitude&quot;</span>: <span style="color: #CC0000;">-0.1</span>,
      <span style="color: #3366CC;">&quot;altitude&quot;</span>: <span style="color: #CC0000;">30.1</span>,
      <span style="color: #3366CC;">&quot;accuracy&quot;</span>: <span style="color: #CC0000;">1200.1</span>,
      <span style="color: #3366CC;">&quot;altitude_accuracy&quot;</span>: <span style="color: #CC0000;">10.1</span>,
      <span style="color: #3366CC;">&quot;address&quot;</span>: <span style="color: #66cc66;">&#123;</span>
        <span style="color: #3366CC;">&quot;street_number&quot;</span>: <span style="color: #3366CC;">&quot;100&quot;</span>,
        <span style="color: #3366CC;">&quot;street&quot;</span>: <span style="color: #3366CC;">&quot;Amphibian Walkway&quot;</span>,
        <span style="color: #3366CC;">&quot;postal_code&quot;</span>: <span style="color: #3366CC;">&quot;94043&quot;</span>,
        <span style="color: #3366CC;">&quot;city&quot;</span>: <span style="color: #3366CC;">&quot;Mountain View&quot;</span>,
        <span style="color: #3366CC;">&quot;county&quot;</span>: <span style="color: #3366CC;">&quot;Mountain View County&quot;</span>,
        <span style="color: #3366CC;">&quot;region&quot;</span>: <span style="color: #3366CC;">&quot;California&quot;</span>,
        <span style="color: #3366CC;">&quot;country&quot;</span>: <span style="color: #3366CC;">&quot;United States of America&quot;</span>,
        <span style="color: #3366CC;">&quot;country_code&quot;</span>: <span style="color: #3366CC;">&quot;US&quot;</span>
      <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span></pre></div></div>
</p>



	<p>The old json api is readable on this <a href="http://code.google.com/p/gears/wiki/GeolocationAPI?redir=1" title="">wiki page</a></p>


	<h2>Why this is good.</h2>

	<p>The geolocation api allows you to build location aware web applications which have access to native location apis. Bringing native hardware to web applications makes the future bright and takes us to a more webby non-native future.</p>

	<h2>How do I use it then?</h2>

	<p>Google maps <span class="caps">V3 API</span> has a great example of geocoding to put your location on a map.</p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="javascript">  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta <span style="color: #000066;">name</span>=<span style="color: #3366CC;">&quot;viewport&quot;</span> content=<span style="color: #3366CC;">&quot;initial-scale=1.0, user-scalable=no&quot;</span> /&gt;
  &lt;meta http-equiv=<span style="color: #3366CC;">&quot;content-type&quot;</span> content=<span style="color: #3366CC;">&quot;text/html; charset=UTF-8&quot;</span>/&gt;
  &lt;title&gt;Google Maps JavaScript API v3 Example: Map Geolocation&lt;/title&gt;
  &lt;link href=<span style="color: #3366CC;">&quot;http://code.google.com/apis/maps/documentation/javascript/examples/default.css&quot;</span> rel=<span style="color: #3366CC;">&quot;stylesheet&quot;</span> type=<span style="color: #3366CC;">&quot;text/css&quot;</span> /&gt;
  &lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span> src=<span style="color: #3366CC;">&quot;http://maps.google.com/maps/api/js?sensor=true&quot;</span>&gt;&lt;/script&gt;
  &lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span> src=<span style="color: #3366CC;">&quot;http://code.google.com/apis/gears/gears_init.js&quot;</span>&gt;&lt;/script&gt;
  &lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span>&gt;
&nbsp;
  <span style="color: #003366; font-weight: bold;">var</span> initialLocation;
  <span style="color: #003366; font-weight: bold;">var</span> siberia = <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #006600;">maps</span>.<span style="color: #006600;">LatLng</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">60</span>, <span style="color: #CC0000;">105</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #003366; font-weight: bold;">var</span> newyork = <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #006600;">maps</span>.<span style="color: #006600;">LatLng</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">40.69847032728747</span>, <span style="color: #CC0000;">-73.9514422416687</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #003366; font-weight: bold;">var</span> browserSupportFlag =  <span style="color: #003366; font-weight: bold;">new</span> Boolean<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #003366; font-weight: bold;">var</span> map;
  <span style="color: #003366; font-weight: bold;">var</span> infowindow = <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #006600;">maps</span>.<span style="color: #006600;">InfoWindow</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
  <span style="color: #003366; font-weight: bold;">function</span> initialize<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> myOptions = <span style="color: #66cc66;">&#123;</span>
      zoom: <span style="color: #CC0000;">6</span>,
      mapTypeId: google.<span style="color: #006600;">maps</span>.<span style="color: #006600;">MapTypeId</span>.<span style="color: #006600;">ROADMAP</span>
    <span style="color: #66cc66;">&#125;</span>;
    map = <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #006600;">maps</span>.<span style="color: #006600;">Map</span><span style="color: #66cc66;">&#40;</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;map_canvas&quot;</span><span style="color: #66cc66;">&#41;</span>, myOptions<span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #009900; font-style: italic;">// Try W3C Geolocation method (Preferred)</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>navigator.<span style="color: #006600;">geolocation</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      browserSupportFlag = <span style="color: #003366; font-weight: bold;">true</span>;
      navigator.<span style="color: #006600;">geolocation</span>.<span style="color: #006600;">getCurrentPosition</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>position<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        initialLocation = <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #006600;">maps</span>.<span style="color: #006600;">LatLng</span><span style="color: #66cc66;">&#40;</span>position.<span style="color: #006600;">coords</span>.<span style="color: #006600;">latitude</span>,position.<span style="color: #006600;">coords</span>.<span style="color: #006600;">longitude</span><span style="color: #66cc66;">&#41;</span>;
        contentString = <span style="color: #3366CC;">&quot;Location found using W3C standard&quot;</span>;
        map.<span style="color: #006600;">setCenter</span><span style="color: #66cc66;">&#40;</span>initialLocation<span style="color: #66cc66;">&#41;</span>;
        infowindow.<span style="color: #006600;">setContent</span><span style="color: #66cc66;">&#40;</span>contentString<span style="color: #66cc66;">&#41;</span>;
        infowindow.<span style="color: #006600;">setPosition</span><span style="color: #66cc66;">&#40;</span>initialLocation<span style="color: #66cc66;">&#41;</span>;
        infowindow.<span style="color: #000066;">open</span><span style="color: #66cc66;">&#40;</span>map<span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#125;</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        handleNoGeolocation<span style="color: #66cc66;">&#40;</span>browserSupportFlag<span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>google.<span style="color: #006600;">gears</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      <span style="color: #009900; font-style: italic;">// Try Google Gears Geolocation</span>
      browserSupportFlag = <span style="color: #003366; font-weight: bold;">true</span>;
      <span style="color: #003366; font-weight: bold;">var</span> geo = google.<span style="color: #006600;">gears</span>.<span style="color: #006600;">factory</span>.<span style="color: #006600;">create</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'beta.geolocation'</span><span style="color: #66cc66;">&#41;</span>;
      geo.<span style="color: #006600;">getCurrentPosition</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>position<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        initialLocation = <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #006600;">maps</span>.<span style="color: #006600;">LatLng</span><span style="color: #66cc66;">&#40;</span>position.<span style="color: #006600;">latitude</span>,position.<span style="color: #006600;">longitude</span><span style="color: #66cc66;">&#41;</span>;
        contentString = <span style="color: #3366CC;">&quot;Location found using Google Gears&quot;</span>;
        map.<span style="color: #006600;">setCenter</span><span style="color: #66cc66;">&#40;</span>initialLocation<span style="color: #66cc66;">&#41;</span>;
        infowindow.<span style="color: #006600;">setContent</span><span style="color: #66cc66;">&#40;</span>contentString<span style="color: #66cc66;">&#41;</span>;
        infowindow.<span style="color: #006600;">setPosition</span><span style="color: #66cc66;">&#40;</span>initialLocation<span style="color: #66cc66;">&#41;</span>;
        infowindow.<span style="color: #000066;">open</span><span style="color: #66cc66;">&#40;</span>map<span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#125;</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        handleNoGeolocation<span style="color: #66cc66;">&#40;</span>browserSupportFlag<span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span>
      <span style="color: #009900; font-style: italic;">// Browser doesn't support Geolocation</span>
      browserSupportFlag = <span style="color: #003366; font-weight: bold;">false</span>;
      handleNoGeolocation<span style="color: #66cc66;">&#40;</span>browserSupportFlag<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #003366; font-weight: bold;">function</span> handleNoGeolocation<span style="color: #66cc66;">&#40;</span>errorFlag<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>errorFlag == <span style="color: #003366; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      initialLocation = newyork;
      contentString = <span style="color: #3366CC;">&quot;Error: The Geolocation service failed.&quot;</span>;
    <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span>
      initialLocation = siberia;
      contentString = <span style="color: #3366CC;">&quot;Error: Your browser doesn't support geolocation. Are you in Siberia?&quot;</span>;
    <span style="color: #66cc66;">&#125;</span>
    map.<span style="color: #006600;">setCenter</span><span style="color: #66cc66;">&#40;</span>initialLocation<span style="color: #66cc66;">&#41;</span>;
    infowindow.<span style="color: #006600;">setContent</span><span style="color: #66cc66;">&#40;</span>contentString<span style="color: #66cc66;">&#41;</span>;
    infowindow.<span style="color: #006600;">setPosition</span><span style="color: #66cc66;">&#40;</span>initialLocation<span style="color: #66cc66;">&#41;</span>;
    infowindow.<span style="color: #000066;">open</span><span style="color: #66cc66;">&#40;</span>map<span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body <span style="color: #000066;">onload</span>=<span style="color: #3366CC;">&quot;initialize()&quot;</span>&gt;
    &lt;div id=<span style="color: #3366CC;">&quot;map_canvas&quot;</span>&gt;&lt;/div&gt;
&nbsp;
  &lt;/body&gt;
  &lt;/html&gt;</pre></div></div>
</p>



	<p>View the <a href="http://code.google.com/apis/maps/documentation/javascript/examples/map-geolocation.html" title="">working example</a></p>

	<h2>Simplest working example</h2>

	<p>Stick this in your firebug console and run it.</p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="javascript">  <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>navigator.<span style="color: #006600;">geolocation</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    navigator.<span style="color: #006600;">geolocation</span>.<span style="color: #006600;">getCurrentPosition</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>position<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Your lat/lng pair is&quot;</span> + position.<span style="color: #006600;">coords</span>.<span style="color: #006600;">latitude</span> + <span style="color: #3366CC;">&quot;, &quot;</span> + position.<span style="color: #006600;">coords</span>.<span style="color: #006600;">longitude</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Your browser does not support W3C geolocation.&quot;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span></pre></div></div>
</p>



	<h2>Conclusion</h2>

	<p>So.. Geolocation. Hype or Hardcore? I think hardcore.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://scoop.simplyexcited.co.uk/2010/08/14/html5-inside-geolocation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Node.js Brief Overview</title>
		<link>http://scoop.simplyexcited.co.uk/2010/07/05/node-js-brief-overview-2/</link>
		<comments>http://scoop.simplyexcited.co.uk/2010/07/05/node-js-brief-overview-2/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 20:28:46 +0000</pubDate>
		<dc:creator>pyrat</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://scoop.simplyexcited.co.uk/2010/07/05/node-js-brief-overview/</guid>
		<description><![CDATA[	

	I managed to get the time to do some research into Node.js last week. I have been meaning to check out the new coolness for hipster nerds like myself. I will try to explain some of the node concepts as I understand them.

	Event based

	Concepts borrowed from ruby&#8217;s event machine, python&#8217;s twisted and the event based [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://s3.amazonaws.com/excitedmedia/nodejs.png" alt="" border="0" /></p>

	<p>I managed to get the time to do some research into Node.js last week. I have been meaning to check out the new coolness for hipster nerds like myself. I will try to explain some of the node concepts as I understand them.</p>

	<h2>Event based</h2>

	<p>Concepts borrowed from ruby&#8217;s <a href="http://rubyeventmachine.com/" title="">event machine</a>, python&#8217;s <a href="http://twistedmatrix.com/trac/" title="">twisted</a> and the event based closure syntax of javascript.</p>

	<p>Often the plan when it comes to scaling request serving in web apps is to use threads. However there is an alternative method which yields better results. This is the <a href="http://en.wikipedia.org/wiki/Event_loop" title="">single thread event loop</a> and a good example of event based vs threading is that of a load test between apache and nginx.</p>

	<p>Apache the worlds most popular webserver. Nginx is a wee russian webserver which punches beyond its weight.</p>

	<p><img src="http://s3.amazonaws.com/excitedmedia/nginx-apache-reqs-sec.png" alt="" border="0" /><br />
<strong>Nginx versus Apache (with the worker-MPM) for serving a small static file.</strong></p>


	<p><img src="http://s3.amazonaws.com/excitedmedia/nginx-apache-memory.png" alt="" border="0" /><br />
<strong>Because Nginx is event-based it doesn&#8217;t need to spawn new processes or threads for each request, so its memory usage is very low.</strong></p>

	<p>These graphs are borrowed from <a href="http://blog.webfaction.com/a-little-holiday-present" title="">this excellent post on the subject</a></p>


	<h2>Its all about the IO man</h2>

	<p><span class="caps">RAM</span> is fast. Disk, DB and Network are very slow in comparison. This results in programs spending a lot of time waiting for IO operations to complete. Node approaches this as being completely the wrong way of doing things and everything should be non-blocking.</p>

	<p>The problem being that most IO libraries are blocking, so there is a movement to upgrade these libraries to be non-blocking but there is also a c based thread pool which node uses to achieve non-blocking whilst using blocking <span class="caps">IO </span>Drivers.</p>

	<h2>Event based is hard</h2>

	<p>Coming from an <span class="caps">OOP MVC</span> background is a hard approach direction to Event based programming. A better approach is looking at javascript in the browser and a working relationship with a framework such as <a href="http://jquery.com" title="">jquery</a> which shows how events can be used in the javascript world to achieve unobstrusive <span class="caps">RIA</span> functionality to your web application.</p>

	<h2>Do I really want to build a website with this?</h2>

	<p>Currently it seems strange to me that you would want to build a website with server-side javascript. There are a lot of great frameworks out there for building web applications and most of them are a lot more mature and powerful than the javascript offerings.</p>

	<p>However, I think that the power of node is in the access to low level functionality to build your own low level network applications.</p>

	<p>Previously, these areas have been limited to people with black art C skills in memory management and other old school tools. Now, any joe blow with some javascript skills and create something which does some powerful things with <em>good performance.</em></p>

	<p>So essentially, programmers who have grown up in the internet age can now write <strong>ace</strong> applications in a way which was previously not possible. In my view, this is the main merit of node.</p>

	<h2>Simple Proxy in Node</h2>

	<p>To achieve an http proxy you would typically install something like <a href="http://www.squid-cache.org/" title="">squid</a> which has a lot of <a href="http://wiki.squid-cache.org/ConfigExamples" title="">configuration options</a></p>

	<p>Obviously squid is very powerful and bursting full of features that you need, you should probably use it actually. However it is really easy to write a proxy in node.</p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="javascript">  <span style="color: #003366; font-weight: bold;">var</span> http = require<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'http'</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #003366; font-weight: bold;">var</span> sys  = require<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'sys'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
&nbsp;
&nbsp;
  <span style="color: #003366; font-weight: bold;">function</span> server_callback <span style="color: #66cc66;">&#40;</span>request, response<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> proxy = http.<span style="color: #006600;">createClient</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">80</span>, request.<span style="color: #006600;">headers</span><span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">'host'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #003366; font-weight: bold;">var</span> proxy_request = proxy.<span style="color: #006600;">request</span><span style="color: #66cc66;">&#40;</span>request.<span style="color: #006600;">method</span>, request.<span style="color: #006600;">url</span>, request.<span style="color: #006600;">headers</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    proxy_request.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'response'</span>, <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span>proxy_response<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      proxy_response.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'data'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>chunk<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        response.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #66cc66;">&#40;</span>chunk, <span style="color: #3366CC;">'binary'</span><span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
      proxy_response.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'end'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        response.<span style="color: #006600;">end</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
      response.<span style="color: #006600;">writeHead</span><span style="color: #66cc66;">&#40;</span>proxy_response.<span style="color: #006600;">statusCode</span>, proxy_response.<span style="color: #006600;">headers</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    request.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'data'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>chunk<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      proxy_request.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #66cc66;">&#40;</span>chunk, <span style="color: #3366CC;">'binary'</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    request.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'end'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      proxy_request.<span style="color: #006600;">end</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
  http.<span style="color: #006600;">createServer</span><span style="color: #66cc66;">&#40;</span>server_callback<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">listen</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">8080</span><span style="color: #66cc66;">&#41;</span>;
  sys.<span style="color: #006600;">puts</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Server running on port 8080&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>
</p>




	<p>There is a proxy which a little bit more functionality which is available <a href="http://github.com/pkrumins/nodejs-proxy" title="">node proxy</a></p>

	<h2>How can I have a go?</h2>

	<p>The easiest installation path I have seen is to install <a href="http://github.com/mxcl/homebrew" title="">homebrew</a> then</p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="bash"><span style="color: #c20cb9; font-weight: bold;">sudo</span> brew <span style="color: #c20cb9; font-weight: bold;">install</span> node</pre></div></div>
</p>



	<p>You can then launch the proxy example with:</p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="bash">node proxy.js</pre></div></div>
</p>



	<h2>I want to put it <span class="caps">LIVE</span></h2>

	<p>Best plan is to deploy it with nginx as a frontend which proxies request to the node instance. One option is using it with upstart and monit.</p>

	<p>This <a href="http://howtonode.org/deploying-node-upstart-monit" title="">blog post</a> describes the process really well. <a href="http://heroku.com" title="">Heroku</a> are in the process of starting of offer node support; but this is still in a closed beta.</p>

	<h2>Conclusion</h2>

	<p>I hope this has given a brief overview of node and it helps you to decide whether to have a go or not.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://scoop.simplyexcited.co.uk/2010/07/05/node-js-brief-overview-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jquery Tiptip IE6</title>
		<link>http://scoop.simplyexcited.co.uk/2010/05/06/jquery-tiptip-ie6/</link>
		<comments>http://scoop.simplyexcited.co.uk/2010/05/06/jquery-tiptip-ie6/#comments</comments>
		<pubDate>Thu, 06 May 2010 07:38:37 +0000</pubDate>
		<dc:creator>pyrat</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://scoop.simplyexcited.co.uk/2010/05/06/jquery-tiptip-ie6/</guid>
		<description><![CDATA[	Tiptip is a nice jquery plugin for displaying tooltips in a simple and elegant manner. All you need to do is set the title attribute with the tooltip content then give it a class name so it it picked up by the tooltip initializer.

	However, it currently doesnt work in IE6 that well. Although users are [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://code.drewwilson.com/entry/tiptip-jquery-plugin" title="">Tiptip</a> is a nice jquery plugin for displaying tooltips in a simple and elegant manner. All you need to do is set the title attribute with the tooltip content then give it a class name so it it picked up by the tooltip initializer.</p>

	<p>However, it currently doesnt work in <span class="caps">IE6</span> that well. Although users are falling I think you still need at least rudimentary support for <span class="caps">IE6</span>.</p>

	<p>Create a conditional comment which includes a stylesheet load in your document header.</p>

	<p>
<div class="wp_syntax"><div class="code"><pre>  &lt;!--[if IE 6]&gt;
     &lt;link href=&quot;/stylesheets/ie6.css?1273083940&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
   &lt;![endif]--&gt;</pre></div></div>
</p>



	<p>And add the following rules to the stylesheet.</p>

	<p><script src="http://gist.github.com/390565.js?file=gistfile1.css"></script></p>
 ]]></content:encoded>
			<wfw:commentRss>http://scoop.simplyexcited.co.uk/2010/05/06/jquery-tiptip-ie6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Christmas Card Labels Application</title>
		<link>http://scoop.simplyexcited.co.uk/2009/12/08/christmas-card-labels-application/</link>
		<comments>http://scoop.simplyexcited.co.uk/2009/12/08/christmas-card-labels-application/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 10:58:19 +0000</pubDate>
		<dc:creator>pyrat</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://scoop.simplyexcited.co.uk/2009/12/08/christmas-card-labels-application/</guid>
		<description><![CDATA[	

	I have been keen to get my hands dirty with ExtJS, so jumped at the chance to make a christmas card list application which can print the list to labels; to stick on envelopes.

	I have finally become mature enough to have a christmas card list along with my girlfriend, which is useful for keeping track [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://scoop.simplyexcited.co.uk/wp-content/uploads/2009/12/santa.jpg" alt="santa" border="0" /></p>

	<p>I have been keen to get my hands dirty with ExtJS, so jumped at the chance to make a christmas card list application which can print the list to labels; to stick on envelopes.</p>

	<p>I have finally become mature enough to have a christmas card list along with my girlfriend, which is useful for keeping track of friends both in Trondheim and the United Kingdom.</p>

	<p>To get it up and running on heroku it is pretty swift &#8211;<br />

<div class="wp_syntax"><div class="code"><pre class="bash">  git clone git://github.com/pyrat/christmas-card-labels.git
  <span style="color: #7a0874; font-weight: bold;">cd</span> christmas-card-labels
  <span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> heroku
  heroku create
  git push heroku master
  heroku rake db:migrate</pre></div></div>
</p>



	<p>You are now good to go, you may need to tweak the css (labels.css) to match your specific labels which can be a painful experience.</p>

	<p>Default username / password is god / jul which is norwegian for merry christmas!</p>

	<p>There is a demo version <a href="http://jul.simplyexcited.co.uk" title="">online</a></p>
 ]]></content:encoded>
			<wfw:commentRss>http://scoop.simplyexcited.co.uk/2009/12/08/christmas-card-labels-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI Compressor vs Google Closure Compiler for Javascript Compression</title>
		<link>http://scoop.simplyexcited.co.uk/2009/11/24/yui-compressor-vs-google-closure-compiler-for-javascript-compression/</link>
		<comments>http://scoop.simplyexcited.co.uk/2009/11/24/yui-compressor-vs-google-closure-compiler-for-javascript-compression/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 14:49:38 +0000</pubDate>
		<dc:creator>pyrat</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://scoop.simplyexcited.co.uk/2009/11/24/yui-compressor-vs-google-closure-compiler-for-javascript-compression/</guid>
		<description><![CDATA[	

	Introduction

	In todays environment of Rich Internet Applications we rely heavily on Javascript. Often this javascript is in the form of a javascript framework. These typically enhance vanilla javascript and allow you to accomplish tasks with a nice syntax and more importantly abstract the differences in browser implementation.

	Despite all the positives the main negative of javascript [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://farm4.static.flickr.com/3264/2916098218_f24bcb63d5_o_d.gif" alt="" border="0" /></p>

	<h2>Introduction</h2>

	<p>In todays environment of Rich Internet Applications we rely heavily on Javascript. Often this javascript is in the form of a javascript framework. These typically enhance vanilla javascript and allow you to accomplish tasks with a nice syntax and more importantly abstract the differences in browser implementation.</p>

	<p>Despite all the positives the main negative of javascript frameworks is the browser overhead when they are downloaded. Often the size of these assets can add up to a few hundred kilobytes. Coupled with the fact that they are normally split into a number of files (increases <span class="caps">HTTP </span>Overhead) this has the effect of decreasing the quality of the user experience while they wait for these files to load when loading your site.</p>

	<p>There are a number of ways to increase client side performance specifically with javascript assets.</p>

	<h2>Decrease <span class="caps">HTTP </span>Overhead</h2>

	<p>Combining assets into single files is the best bet here. Prototype and Scriptaculous take up five or so separate uncompressed files. Decreasing <span class="caps">HTTP</span> overhead is one of the biggest time savers.</p>

	<h2>Caching</h2>

	<p>This involves telling browsers that they can cache a file for a time in the future. This is known as the expires header. <a href="http://scoop.simplyexcited.co.uk/2009/05/21/using-mod_expires-to-speed-up-serving-pages-with-apache/" title="">Mod_expires</a> is a way to achieve this with Apache. It is common to append a timestamp to the url eg.</p>

<pre>
/javascripts/defaults.js?343423434342
</pre>

	<p>A technique which is applied by rails is that this number value is infact the last modified timestamp from the file so you can then set a long expires on this (maximum possible) as changing the default.js file will alter the file, change the timestamp and generate a new unique <span class="caps">URL</span> which can be recached.</p>

	<h2>Gzip Compression</h2>

	<p>Another big timesaver for big assets. This actually zips up the asset before pumping it down the pipe. You can configure this in your nginx configuration or use <a href="http://scoop.simplyexcited.co.uk/2009/05/20/turning-on-mod_deflate-to-speed-up-apache/" title="">mod_deflate</a> if you are on apache.</p>

	<h2>Javascript Compression and Optimisation</h2>

	<p>This area still developing, the main players at the moment at the <a href="http://developer.yahoo.com/yui/compressor/" title=""><span class="caps">YUI </span>Compressor</a> developed by Yahoo and the <a href="http://code.google.com/closure/compiler/" title="">Closure Compiler</a> developed by Google.</p>

	<p>I use a basic prototype / scriptaculous framework for <a href="http://www.oentries.com" title="">oentries</a> so have used this for a little battle between the compressors.</p>

	<p>Compilation commands are as follows for reference.</p>

	<p><strong><span class="caps">YUI</span></strong></p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="bash">  java -jar /path/to/yuicompressor<span style="color: #000000;">-2.4</span><span style="color: #000000;">.2</span>.jar --<span style="color: #7a0874; font-weight: bold;">type</span> js -o defaults.yui.js defaults.js</pre></div></div>
</p>



	<p><strong>Closure (Standard mode)</strong></p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="bash">  java -jar /path/to/compiler.jar  --js defaults.js --js_output_file defaults.google.js</pre></div></div>
</p>



	<p><strong>Closure (Advanced Optimizations Mode)</strong></p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="bash">  java -jar /path/to/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --js defaults.js --js_output_file defaults.google-advanced.js</pre></div></div>
</p>



	<p><span class="caps">NOTE</span>: You need to be running Java 6 to use the closure compiler.</p>

	<p>This experiment was performed on a 1Gb Ubuntu Hardy Heron <span class="caps">VPS </span>Slice.</p>

	<p><img src="http://scoop.simplyexcited.co.uk/wp-content/uploads/2009/11/comparison_of_compression.png" alt="Comparison of Compression" border="0" /><br />
<strong>Comparison of Compression (Kb)</strong></p>

	<p><span class="caps">YUI</span> and Google Closure standard mode produce a similar result circa 60% of the original size. However closure with advanced optimisations leads the way at 43% of the original size!</p>

	<p>There is however a <span class="caps">BUT</span>. The advanced optimisations mode actually removed methods which are not called! Have a look at <a href="http://code.google.com/closure/compiler/docs/api-tutorial3.html#dangers" title="">these docs</a></p>

	<p>In a standard <span class="caps">RIA</span> you will often call functions from inline <span class="caps">HTML </span>(onclick events) etc. This makes this form of aggressive optimisation too much for standard applications. You could however remove all javascript calls from <span class="caps">HTML</span> and so it all unobtrusively as it standard practice in JQuery.</p>


	<p><img src="http://farm3.static.flickr.com/2568/4131151072_f50d8dd2f9_o.png" width="500" height="300" alt="Compression time" /><br />
<strong>Comparison of Compression Time (Seconds)</strong></p>

	<p><span class="caps">YUI</span> is substantially faster than google closure at JS compression. If you were to add this into your deployment strategy this gives <span class="caps">YUI</span> the advantage.</p>

	<h2>Compressor Conclusion</h2>

	<p>Whilst it looks like closure is a better compressor, I just don&#8217;t think it is safe to be this aggressive with compression for production environments.</p>

	<p>If you then run closure on standard mode, the differences in compression vs <span class="caps">YUI</span> are minimal. With the speed advantage of <span class="caps">YUI</span>, I would definitely pick <span class="caps">YUI</span>. YUI has the other big advantage in that it can compress <span class="caps">CSS</span> as well.</p>

	<p>Has anyone had any experience with Javascript Compressors? Comment if you do.</p>

	<h2>Conclusion</h2>

	<p>I hope this has given an insight into the wonderful world of speeding up the delivery of your javascript assets. Now get out there and compress!</p>
 ]]></content:encoded>
			<wfw:commentRss>http://scoop.simplyexcited.co.uk/2009/11/24/yui-compressor-vs-google-closure-compiler-for-javascript-compression/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

