<?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/"
	>

<channel>
	<title>The Worm Hole</title>
	<atom:link href="http://happyworm.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://happyworm.com/blog</link>
	<description>Breaking new ground on the web &#124; The Worm Hole</description>
	<pubDate>Fri, 05 Mar 2010 13:37:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HTML5 Video. Who needs Flash?</title>
		<link>http://happyworm.com/blog/2010/03/05/html5-video-who-needs-flash/</link>
		<comments>http://happyworm.com/blog/2010/03/05/html5-video-who-needs-flash/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 11:28:55 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
		
		<category><![CDATA[Audio]]></category>

		<category><![CDATA[HTML5]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://happyworm.com/blog/?p=504</guid>
		<description><![CDATA[Nobody it seems, at least not for video. Almost unbelievably in the space of a year, Flash the once ubiquitous format for all web-based video, has become surplus to requirements. Shunned by Microsoft in favour of Silverlight and by other browsers in favour of HTML5. Significantly, now that Opera has joined the ranks of HTML5 [...]]]></description>
			<content:encoded><![CDATA[<p>Nobody it seems, at least not for video. Almost unbelievably in the space of a year, Flash the once ubiquitous format for all web-based video, has become surplus to requirements. Shunned by Microsoft in favour of Silverlight and by other browsers in favour of HTML5. Significantly, now that Opera has <a href="http://my.opera.com/core/blog/2010/03/03/everything-you-need-to-know-about-html5-video-and-audio-2">joined the ranks</a> of HTML5 video supporting browsers none of the top 5 browsers now require the Flash plugin to play video.</p>
<p>It seems this fact has not been lost on the web development community, with a slew of demos and plugins being released over the last few weeks. One of the first to cause a stir was the excellent <a href="http://jilion.com/sublime/video">SublimeVideo player</a>. Not to be outdone the <a href="http://chikuyonok.ru/ambilight/">Ambilight player</a> shows what can be achieved when you integrate HTML5 video with canvas. Video affecting other parts of a web-page, who knew that was even possible?</p>
<p>There&#8217;s also been some progress on fallbacks for non supporting browsers. Earlier this week <a href="http://twitter.com/etianen" >Dave Hall</a> released a <a href="http://code.google.com/p/html5media/">&#8216;patch&#8217;</a> for  those browsers that don&#8217;t support video natively. This was shortly followed by the release a jQueryless <a href="http://gist.github.com/320747">modification</a> by <a href="http://twitter.com/rem">Remy Sharp</a>. This is great news as it means that we can use the &lt;video&gt; tag right <i>now</i>!</p>
<p>But they kept coming. <a href="http://twitter.com/mario_fischer">Mario Fischer</a> making an excellent post on how to use <a href="http://www.chipwreck.de/blog/2010/03/02/html-5-video-mootools/">HTML5 video with Mootools</a>.</p>
<p>Hot on his heels Michael Dale came out with a <a href="http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library"> HTML5 Video plugin for jQuery</a>. Something close to our hearts here at Happyworm, having made <a href="http://happyworm.com/jplayer/">something similar</a> for &lt;audio&gt;.</p>
<p>They say a week is a long time in politics, but this seems doubly true of HTML5 right now. Things are moving apace and they are moving towards a richer web, increasingly less reliant on third-party plugins.</p>
<p>Exciting times indeed.</p>
<p>Mark B</p>
<p>Related:</p>
<p><a href="http://www.html5patch.org/related-articles/">HTML5Patch Articles</a><br />
<a href="http://happyworm.com/blog/2009/08/24/html-5-the-revolution-will-not-be-televised/">HTML5 The Revolution will not be Televised</a></p>
]]></content:encoded>
			<wfw:commentRss>http://happyworm.com/blog/2010/03/05/html5-video-who-needs-flash/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Simple and Robust jQuery 1.4 CDN Failover in One Line</title>
		<link>http://happyworm.com/blog/2010/01/28/a-simple-and-robust-cdn-failover-for-jquery-14-in-one-line/</link>
		<comments>http://happyworm.com/blog/2010/01/28/a-simple-and-robust-cdn-failover-for-jquery-14-in-one-line/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 11:35:44 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
		
		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[configuration]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[CDN]]></category>

		<category><![CDATA[LABjs]]></category>

		<guid isPermaLink="false">http://happyworm.com/blog/?p=455</guid>
		<description><![CDATA[Mark Boas
Google, Yahoo, Microsoft and others host a variety of JavaScript libraries on their Content Delivery Networks (CDN) - the most popular of these libraries being jQuery. But it&#8217;s not until the release of jQuery 1.4 that we were able to create a robust failover solution should the CDN not be available.
First off, lets look [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/maboa">Mark Boas</a></p>
<p>Google, Yahoo, Microsoft and others host a variety of JavaScript libraries on their Content Delivery Networks (CDN) - the most popular of these libraries being jQuery. But it&#8217;s not until the release of jQuery 1.4 that we were able to create a robust failover solution should the CDN not be available.</p>
<p>First off, lets look into why you might want to use a CDN for your JavaScript libraries:</p>
<p>1. <strong>Caching</strong> - The chances are the person already has the resource cached from another website that linked to it.</p>
<p>2. <strong>Reduced Latency</strong> - For the vast majority the CDN is very likely to be much faster and closer than your own server.</p>
<p>3. <strong>Parallelism</strong> - There is a limit to the number of simultaneously connections you can make to the same server. By offloading resource to the CDN you free up a connection.</p>
<p>4. <strong>Cleanliness</strong> - Serving your static content from another domain can help ensure that you don&#8217;t get unnecessary cookies coming back with the request.</p>
<p>All these aspects are likely to add up to better performance for your website - something  we should all be striving for.</p>
<p> For more discussion of this issue I highly recommend this article from <a href="http://twitter.com/zoompf">Billy Hoffman</a> : <a href="http://zoompf.com/blog/2010/01/should-you-use-javascript-library-cdns/">Should You Use JavaScript Library CDNs? </a>which includes arguments for and against.</p>
<p>The fly in the ointment is that we are  introducing another point of failure.</p>
<p>Major CDNs do occasionally experience outages and when that happens this means that potentially all the sites relying on that CDN go down too. So far this has happened fairly infrequently but it is always good practice to keep your points of failure to a minimum or at least provide a failover. A failover being a backup method you use if your primary method fails.</p>
<p>I started looking at a failover solution for loading jQuery1.3.2 from a CDN some months ago. Unfortunately jQuery 1.3.2 doesn&#8217;t recognise that the DOM is ready if it is added to a page AFTER the page has loaded. This made  making a simple but robust JavaScript failover solution more difficult as the possibility existed for a race condition to occur with jQuery loading after the page is ready. Alternative methods that relied on blocking the page load and retrying an alternative source if the primary returned a 404 (page not found) error code were complicated by the fact that  the Opera browser didn&#8217;t fire the &quot;load&quot; event in this situation, so when creating a cross-browser solution it was difficult to move on to the backup resource.</p>
<p>In short, writing a robust failover solution wasn&#8217;t easy and would consume significant resource. It was doubtful that the benefit would justify the expense.</p>
<p>The good news is that <a href="http://github.com/jquery/jquery/blob/master/src/core.js#L393">jQuery1.4 now checks for the dom-ready state</a> and doesn&#8217;t just rely on the dom-ready event to detect when the DOM is ready, meaning that we can now use a simpler solution with more confidence.</p>
<p>Note that importantly the dom-ready state <a href="https://developer.mozilla.org/en/DOM/document.readyState">is now implemented in Firefox 3.6</a>, <a href="http://code.google.com/p/doctype/wiki/DocumentReadyStateProperty">bringing it in line with Chrome, Safari, Opera and Internet Explorer.</a> This then gives us great browser coverage.</p>
<p>So now in order to provide an acceptably robust failover solution all you need do is include your link to the CDN hosted version of jQuery as usual :</p>
<pre  name="code" class="javascript">
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;&gt;&lt;/script&gt;
</pre>
<p>and add some JS inline, similar to this:</p>
<pre  name="code" class="javascript">
  &lt;script type=&quot;text/javascript&quot;&gt;
  if (typeof jQuery === 'undefined') {
     var e = document.createElement('script');
     e.src = '/local/jquery-1.4.min.js';
     e.type='text/javascript';
     document.getElementsByTagName(&quot;head&quot;)[0].appendChild(e);
  }
  &lt;/script&gt;</pre>
<p>You are then free to load your own JavaScript as usual:</p>
<pre  name="code" class="javascript">
&lt;script type=&quot;text/javascript&quot; src=&quot;my.js&quot;&gt;&lt;/script&gt;
</pre>
<p>It should be well noted however that the above approach does not &quot;defer&quot; execution of other script loading (such as jQuery plugins) or script-execution (such as inline JavaScript) until after jQuery has fully loaded. Because the fallbacks rely on appending script tags, further script tags after it in the markup would load/execute immediately and not wait for the local jQuery to load, which could cause dependency errors.</p>
<p>One such solution is:</p>
<pre  name="code" class="javascript">
&lt;script type=&quot;text/javascript&quot;&gt;
  if (typeof jQuery === 'undefined')
     document.write('script type="text/javascript" src="/local/jquery-1.4.min.js"&gt;&lt;\/script&gt;');
&lt;/script&gt;</pre>
<p>Not quite as neat perhaps, but crucially if you use a document.write() you will block other JavaScript included lower in the page from loading and executing.</p>
<p>Alternatively you can use <a href="http://twitter.com/getify">Getify</a>&#8217;s excellent JavaScript Loading and Blocking library <a href="http://labjs.com/">LABjs</a> to create a more solid solution, something like this :
</p>
<pre  name="code" class="javascript">
  &lt;script type=&quot;text/javascript&quot; src=&quot;LAB.js&quot;&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
  function loadDependencies(){
  $LAB.script(&quot;jquery-ui.js&quot;).script(&quot;jquery.myplugin.js&quot;).wait(...);
  }

  $LAB
  .script(&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;).wait(function(){
  if (typeof window.jQuery === &quot;undefined&quot;)
     // first load failed, load local fallback, then dependencies
     $LAB.script(&quot;/local/jquery-1.4.min.js&quot;).wait(loadDependencies);
  else
     // first load was a success, proceed to loading dependencies.
     loadDependencies();
  });
  &lt;/script&gt;</pre>
<p>Note that since the dom-ready state is only available in Firefox 3.6 + &lt;script&gt; only solutions without something like LABjs are still not guaranteed to work well with versions of Firefox 3.5 and below and even with LABjs only with jQuery 1.4 (and above).</p>
<p>This is because LABjs contains a patch to add the missing &quot;document.readyState&quot; to those older Firefox browsers, so that when jQuery comes in, it sees the property with the correct value and dom-ready works as expected.</p>
<p>If you don&#8217;t want to use LABjs you could implement a similar patch like so:</p>
<pre  name="code" class="javascript">
  &lt;script type=&quot;text/javascript&quot;&gt;
  (function(d,r,c,addEvent,domLoaded,handler){
     if (d[r] == null &amp;&amp; d[addEvent]){
        d[r] = &quot;loading&quot;;
        d[addEvent](domLoaded,handler = function(){
        d.removeEventListener(domLoaded,handler,false);
        d[r] = c;
     },false);
   }
})(window.document,&quot;readyState&quot;,&quot;complete&quot;,&quot;addEventListener&quot;,&quot;DOMContentLoaded&quot;);
&lt;/script&gt;
</pre>
<p>(Adapted from a <a href="http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html">hack</a> suggested by Andrea Giammarchi.)
</p>
<p>So far we have talked about CDN failure but what happens if the CDN is simply taking a long time to respond? The page-load will be delayed for that whole time before proceeding. To avoid this situation some sort of time based solution is required.</p>
<p>Using LABjs, you could construct a (somewhat more elaborate) solution that would also deal with  the timeout issue:</p>
<pre  name="code" class="javascript">
  &lt;script type=&quot;text/javascript&quot; src=&quot;LAB.js&quot;&gt;&lt;/script&gt;

  &lt;script type=&quot;text/javascript&quot;&gt;
  function test_jQuery() { jQuery(&quot;&quot;); }
  function success_jQuery() { alert(&quot;jQuery is loaded!&quot;); 

  var successfully_loaded = false;
  function loadOrFallback(scripts,idx) {
     function testAndFallback() {
        clearTimeout(fallback_timeout);
        if (successfully_loaded) return; // already loaded successfully, so just bail
        try {
           scripts[idx].test();
           successfully_loaded = true; // won't execute if the previous &quot;test&quot; fails
           scripts[idx].success();
        } catch(err) {
           if (idx &lt; scripts.length-1) loadOrFallback(scripts,idx+1);
        }
     }

     if (idx == null) idx = 0;
     $LAB.script(scripts[idx].src).wait(testAndFallback);
     var fallback_timeout = setTimeout(testAndFallback,10*1000); // only wait 10 seconds
  }
  loadOrFallback([
     {src:&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;, test:test_jQuery, success:success_jQuery),
     {src:&quot;/local/jquery-1.4.min.js&quot;, test:test_jQuery, success:success_jQuery}
  ]);
  &lt;/script&gt;
</pre>
<p>To sum up - creating a truly robust failover solution is not simple. We need to consider browser incompatabilities, document states and events, dependencies, deferred loading and time-outs! Thankfully tools like LABjs exist to help us ease the pain by giving us complete control over the loading of our JavaScript files. Having said that, you may find that in many cases the &lt;script&gt; only solutions may be good enough for your needs.</p>
<p>Either way my hope is that these methods and techniques  provide you with the means to implement a robust and efficient failover mechanism in very few bytes.</p>
<p>A big thanks to <a href="http://twitter.com/getify">Kyle Simpson</a>, <a href="http://twitter.com/Jeresig">John Resig</a>, <a href="http://twitter.com/pdokas">Phil Dokas</a>, <a href="http://twitter.com/aaronsaray">Aaoran Saray</a> and <a href="http://twitter.com/WebReflection">Andrea Giammarchi</a> for the inspiration and information for this post.</p>
<p><a href="http://twitter.com/maboa">Mark B</a></p>
<p><strong>Related articles / resources:</strong></p>
<p>1.<a href="http://LABjs.com">http://LABjs.com</a></p>
<p>2.<a href="http://groups.google.com/group/jquery-dev/browse_thread/thread/87a675bd840ff070/ac60006335f9e23a?hl=en">http://groups.google.com/group/jquery-dev/browse_thread/thread/87a675bd840ff070/ac60006335f9e23a?hl=en</a></p>
<p>3.<a href="http://aaronsaray.com/blog/2009/11/30/auto-failover-for-cdn-based-javascript/">http://aaronsaray.com/blog/2009/11/30/auto-failover-for-cdn-based-javascript/</a></p>
<p>4.<a href="http://snipt.net/pdokas/load-jquery-even-if-the-google-cdn-is-down/">http://snipt.net/pdokas/load-jquery-even-if-the-google-cdn-is-down/</a></p>
<p>5.<a href="http://stackoverflow.com/questions/1447184/microsoft-cdn-for-jquery-or-google-cdn">http://stackoverflow.com/questions/1447184/microsoft-cdn-for-jquery-or-google-cdn</a></p>
<p>6.<a href="http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html">http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html</a></p>
<p>7.<a href="http://zoompf.com/blog/2010/01/should-you-use-javascript-library-cdns/">http://zoompf.com/blog/2010/01/should-you-use-javascript-library-cdns/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://happyworm.com/blog/2010/01/28/a-simple-and-robust-cdn-failover-for-jquery-14-in-one-line/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HTML5 - The Revolution will not be Televised</title>
		<link>http://happyworm.com/blog/2009/08/24/html-5-the-revolution-will-not-be-televised/</link>
		<comments>http://happyworm.com/blog/2009/08/24/html-5-the-revolution-will-not-be-televised/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 14:32:50 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
		
		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[CSS]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[HTML5]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[webdesign]]></category>

		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://happyworm.com/blog/?p=332</guid>
		<description><![CDATA[The Seeds of Change
There&#8217;s a lot of buzz being generated about HTML5 just now and I for one welcome the discussion that it has provoked. I&#8217;d always kept half an eye on the ongoing controversy regarding whether it was better to use the XHTML or HTML 4.01 standard. To add fuel to the fire, as [...]]]></description>
			<content:encoded><![CDATA[<h2>The Seeds of Change</h2>
<p>There&#8217;s a lot of buzz being generated about <abbr>HTML5</abbr> just now and I for one welcome the discussion that it has <a href="http://www.zeldman.com/2009/07/07/in-defense-of-web-developers/">provoked</a>. I&#8217;d always kept half an eye on the <a href="http://www.b-list.org/weblog/2008/jun/18/html/">ongoing controversy</a> regarding whether it was better to use the <abbr>XHTML</abbr> or <abbr>HTML 4.01</abbr> standard. To add fuel to the fire, as <abbr>HTML5</abbr> gained traction <a href="http://www.w3.org/News/2009#item119"> it was announced that work on <abbr>XHTML 2</abbr> spec would be discontinued</a>. Many people felt that this vindicated the <abbr>HTML 4</abbr> camp&#8217;s arguments and that XHTML was dead. The truth of course was <a href="http://adactio.com/journal/1595/">slightly more complicated</a> as <a href="http://html5doctor.com/html-5-xml-xhtml-5/">HTML5 can be reasonably presented as <abbr>XHTML</abbr></a>. Either way we now seem to have one standard to unite behind which brings us closer to designer&#8217;s <abbr>HTML</abbr> utopia, where markup can be written once and work across all browsers. I believe a <a href="http://en.wikipedia.org/wiki/The_Tipping_Point">critical point</a> has been reached.</p>
<p>So what advantages does <abbr>HTML5</abbr> offer? Well it basically provides a framework for a richer user experience. To name a few features without creating a huge list; it supports audio, video, vector based graphics and animation, geolocation and drag and drop. Check out the <a href="http://dev.w3.org/html5/spec/Overview.html">spec</a> for more info.</p>
<p>Browser vendors are only now starting to implement some of the <abbr>HTML5</abbr> features within their latest and greatest releases. Safari 4, Firefox 3.5, Chrome 3 and even Opera 10 to a greater or lesser extent now support <abbr>HTML 5</abbr>. Internet Explorer being the obvious &#8216;elephant in the room&#8217;. It&#8217;s true that the <abbr>HTML5</abbr> spec has yet to be finalised and depending on who you believe will not be finalised until 2022, but it seems <a href="http://html5doctor.com/2022-or-when-will-html-5-be-ready/">this is less important than it sounds</a>. What we are starting to see is something relatively new, the web development community getting behind a standard and actively pushing it forward. Control lies, now more than ever in the hands of web developers, the end-users, if you like, of the standards. It might seem futile to adopt a standard before it is finished, especially given that probably less than 10% of the installed browser base is currently taking advantage of it in any meaningful manner. But it&#8217;s worth considering that <a href="http://www.andrejkoelewijn.com/wp/2009/05/30/google-wave-killer-app-for-html-5/">Google have adopted <abbr>HTML5</abbr> as the markup of choice</a> for their <a href="http://mashable.com/2009/07/21/google-wave-invites/">up and coming</a> <a href="http://google-code-updates.blogspot.com/2009/05/hello-world-meet-google-wave.html">Wave product</a> and also consider that <a href="http://webkit.org/blog/126/webkit-does-html5-client-side-database-storage/">Webkit is now starting to support HTML5</a> and that it is the rendering engine used by Chrome, Android, Safari and PalmPre OS and presumably the recently announced <a href="http://googlesystem.blogspot.com/2009/07/google-chrome-operating-system.html">Google OS</a>.</p>
<h2>Corporation and Community</h2>
<p>It seems that it&#8217;s not so much about the corporations anymore, more about the community. Not all browsers support HTML5, so what does the community do about it? It creates &#8216;patches&#8217; for these browsers. These patches are usually written in JavaScript and aim to introduce <abbr>HTML5</abbr> compliance to browsers that don&#8217;t support it. <abbr>HTML5</abbr> introduces many new aspects and behaviour and various authors are working on different aspects of the spec <a href="http://dean.edwards.name/">Dean Edwards</a> is making fantastic progress on <a href="http://blip.tv/file/2299313">making Web Forms 2.0 work across all browsers</a>. <a href="http://erik.eae.net/">Erik Arvidsson</a> has done some great work creating a <a href="http://explorercanvas.blogspot.com/2009/03/new-explorer-canvas-release.html">library for emulating the Canvas tag on Internet Explorer</a> as have <a href="http://me.eae.net/archive/2005/12/29/canvas-in-ie/">others</a>, Jacob Rask is working on <a href="http://jacobrask.net/blog/2009/html5-css-reset/">HTML5 CSS Reset</a> and then there&#8217;s people like <a href="http://happyworm.com">us</a> who hope to make contributions to the smaller aspects of the <abbr>HTML 5</abbr> spec such as <a href="http://happyworm.com/jplayer">audio</a>. This isn&#8217;t a unified effort, at least not yet. But a common binding force that unites them is that they are all Open Source solutions, so anyone could come along, bundle them together and create a comprehensive patch for any browser. Of course the more comprehensive the support the more complex things become and I imagine Internet Explorer 6 support is the worst case scenario.</p>
<h2>The Fly in the Ointment</h2>
<p>To diverge and talk about Internet Explorer 6 for a moment. <abbr>IE6</abbr>,  to put it kindly, does things &#8216;in its own unique way&#8217;, and for this reason is the bane of many web designer&#8217;s lives. Some time ago I was experimenting with creating custom tags for IE6 and found out that although it is possible to implement them, <a href="http://happyworm.com/blog/2007/10/24/internet-explorer-oddities-with-custom-html-tags/">it goes about this completely differently to any other browser</a>. I&#8217;m guessing that being able to deal with custom tags is essential if you have to deal with tags that aren&#8217;t implemented in a particular browser. I&#8217;m not sure whether the current crop of &#8216;patches&#8217; are supporting <abbr>IE6</abbr> but I can certainly imagine that if they do, they&#8217;ve had to go around the houses to do so. IE6 unfortunately has a large install base inside many large corporations. Many companies rolled out intranet applications when IE6 was standard on the corporate desktop and so were targeted specifically to that one browser. It&#8217;s hard for a company to justify re-writing these applications to work on any other browser. The &#8220;if it ain&#8217;t broke - don&#8217;t fix it&#8221; mentality is a strong one, especially where spending money is concerned. While web sites and internet based applications continue to work, corporations will have no incentive to upgrade or provide another browser for surfing the web with. There are signs though that this will change in the near future. <a href="http://www.stoplivinginthepast.com/">Whole movements</a> have sprung up <a href="http://www.ie6nomore.com/">against IE6</a>, large and established sites <a href="http://37signals.blogs.com/products/2008/07/basecamp-phasin.html">have discontinued support</a> or are <a href="http://www.techradar.com/news/internet/official-youtube-to-stop-ie6-support-616309">thinking seriously about dropping it</a>. The <abbr>IE6</abbr> legacy cannot go on for ever.</p>
<p>There is however a price to pay for using these &#8216;patches&#8217;. Undoubtedly browsers that don&#8217;t support <abbr>HTML5</abbr> natively will run more slowly using the patches to support it. They do anyway you might counter - people use them just the same. JavaScript is light, it can be compressed, it can be cached, it can be hosted on <a href="http://en.wikipedia.org/wiki/Content_delivery_network"><abbr>CDN</abbr></a>s. I personally don&#8217;t think this a real issue and if users find that it is, they can always upgrade. Accessibility is the other key issue that needs to be addressed, but I will leave that for another discussion.</p>
<h2>May we Live in Interesting Times</h2>
<p>If you think about it for a minute, what is going on now, happening right under our very noses is nothing short of a revolution, a seismic shift in power towards the community and away from the browser vendors, the consequences of which cannot be underestimated. The <a href="http://www.w3.org/"><abbr>W3C</abbr></a> has loosened its grip on the <abbr>HTML</abbr> specs and we now have the <a href="http://www.whatwg.org/"><abbr>WHATWG</abbr> community</a>, and it appears that most browser makers are listening attentively to the new combined web design and standards community. It&#8217;s all about the community. It doesn&#8217;t seem to even matter when a spec will be finalised, significant chunks of it are being implemented now, people are using them and the community is developing for them. Slowly but very surely we are approaching web designer&#8217;s nirvana, where not only does a modern markup language incorporating many new and needed features finally exist, but importantly an environment is being created where designers have the possibility to implement these features once knowing that, in some way or another, they can make them work on all target browsers. All of this powered by the web development community who are finally taking control of their own destiny.<br />
¡Viva La Revolución!</p>
<p><a href="http://twitter.com/maboa">Mark B</a></p>
<h3>Further reading:</h3>
<ul>
<li><a href="http://dev.w3.org/html5/spec/Overview.html">HTML5 W3C Spec</a></li>
<li><a href="http://wiki.whatwg.org/wiki/HTML_vs._XHTML">HTML vs. XHTML</a></li>
<li><a href="http://www.webdevout.net/articles/beware-of-xhtml>Beware of XHTML</a></li>
<li><a href="http://webkit.org/blog/68/understanding-html-xml-and-xhtml/">Surfin’ Safari - Blog Archive » Understanding HTML, XML and XHTML</a></li>
<li><a href="http://blogs.techrepublic.com.com/programming-and-development/?p=718">HTML5 Editor Ian Hickson discusses features, pain points, adoption rate, and more</a></li>
<li><a href="http://google-code-updates.blogspot.com/2009/04/html5-and-webkit-pave-way-for-mobile.html">HTML5 and WebKit pave the way for mobile web applications</a></li>
<li><a href="http://hacks.mozilla.org/2009/06/html5-video-fallbacks/">Using HTML5 video with fallbacks to other formats</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://happyworm.com/blog/2009/08/24/html-5-the-revolution-will-not-be-televised/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HTML5 and Audio</title>
		<link>http://happyworm.com/blog/2009/07/31/html-5-and-audio/</link>
		<comments>http://happyworm.com/blog/2009/07/31/html-5-and-audio/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 08:59:36 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
		
		<category><![CDATA[Audio]]></category>

		<category><![CDATA[HTML5]]></category>

		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://happyworm.com/blog/?p=365</guid>
		<description><![CDATA[I recently had the pleasure of working with the HTML 5 Doctors. They were interested in publishing a piece on the state of HTML 5 Audio and we were happy to oblige. The post was also picked up by Ajaxian.com 
It is great to be given the opportunity to provoke discussion on the latest developments [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the pleasure of working with the <a href="http://html5doctor.com">HTML 5 Doctors</a>. They were interested in publishing a piece on the state of HTML 5 Audio and <a href="http://html5doctor.com/native-audio-in-the-browser/">we were happy to oblige</a>. The post was also <a href="http://ajaxian.com/archives/the-doctor-subscribes-html-5-audio-cross-browser-support ">picked up by Ajaxian.com</a> </p>
<p>It is great to be given the opportunity to provoke discussion on the latest developments in browser technology. Web-based audio is something we&#8217;ve long been interested in and it appears big changes are afoot.</p>
<p>Mark B</p>
]]></content:encoded>
			<wfw:commentRss>http://happyworm.com/blog/2009/07/31/html-5-and-audio/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jPlayer: the CSS styleable jQuery mp3 player plugin</title>
		<link>http://happyworm.com/blog/2009/05/05/jplayer-the-css-styleable-jquery-mp3-player-plugin/</link>
		<comments>http://happyworm.com/blog/2009/05/05/jplayer-the-css-styleable-jquery-mp3-player-plugin/#comments</comments>
		<pubDate>Tue, 05 May 2009 16:48:54 +0000</pubDate>
		<dc:creator>Mark P</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://happyworm.com/blog/?p=70</guid>
		<description><![CDATA[With the jPlayer plugin for jQuery it is possible to include a fully customizable mp3 player on webpages. jPlayer has been developed by Happyworm and features standard track and volume controls as well as the possibility to play a playlist.

jPlayer Features:

play and control mp3 files in your webpage
create and style an mp3 player using just [...]]]></description>
			<content:encoded><![CDATA[<p>With the <a href="http://www.happyworm.com/jquery/jplayer">jPlayer</a> plugin for <a href="http://jquery.com">jQuery</a> it is possible to include a fully customizable mp3 player on webpages. jPlayer has been developed by <a href="http://www.happyworm.com">Happyworm</a> and features standard track and volume controls as well as the possibility to play a playlist.</p>
<div style="margin:10px 20px 30px 20px;"><a href="http://www.happyworm.com/jquery/jplayer/0.2.5/demo-01.htm" title="jPlayer Demo"><img src="http://www.happyworm.com/jquery/jplayer/graphics/jplayer_demo_01.jpg" alt="jPlayer Demo" /></a></div>
<p><strong>jPlayer Features:</strong></p>
<ul>
<li style="margin-left:20px;list-style-type:circle;"><strong>play and control mp3 files</strong> in your webpage</li>
<li style="margin-left:20px;list-style-type:circle;">create and style an <strong>mp3 player</strong> using just HTML and CSS</li>
<li style="margin-left:20px;list-style-type:circle;"><strong>add sound effects</strong> to your jQuery projects</li>
<li style="margin-left:20px;list-style-type:circle;">improved bandwidth in <strong>HTML5</strong> with alternative <strong>ogg format support</strong></li>
</ul>
<p>What&#8217;s unique about this plugin is that the designer has full CSS control over the audio player on their webpage. Using standard HTML and CSS, they can style the audio player to be added to their site so that it fits with their overall site design.</p>
<p>The plugin checks for and uses HTML5 &lt;audio&gt; tag support for mp3 and ogg formats in complaint browsers, otherwise it uses a piece of Flash to play the mp3 files. This is hidden from view and the final look of the site is entirely up to the designer. As you&#8217;d expect, the operations of the plugin may be customised using bespoke javascript code in the webpages to perform whatever functions required.</p>
<p>For example, the following code automatically plays and then repeats &#8216;elvis.mp3&#8242; or &#8216;elvis.ogg&#8217; depending on browser support. Play, pause and stop controls are also made available.</p>
<pre  name="code" class="javascript">
$(document).ready(function(){
	$("#jquery_jplayer").jPlayer({ // Instantiate the plugin
		ready: function () { // Executed when the plugin is ready
			$(this).setFile('elvis.mp3', 'elvis.ogg').play(); // Auto-play the audio
		},
		oggSupport: true
	});

	$("#jquery_jplayer").jPlayerId("play", "play_button"); // Associates play
	$("#jquery_jplayer").jPlayerId("pause", "pause_button"); // Associates pause
	$("#jquery_jplayer").jPlayerId("stop", "stop_button"); // Associates stop

	$("#jquery_jplayer").onSoundComplete( function() { // Executed when the mp3 ends
		$(this).play(); // Auto-repeat
	});
});

&lt;body&gt;
&lt;div id="jquery_jplayer"&gt; &lt;/div&gt;
&lt;ul&gt;
	&lt;li id="play_button"&gt; play &lt;/li&gt;
	&lt;li id="pause_button"&gt; pause &lt;/li&gt;
	&lt;li id="stop_button"&gt; stop &lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;
</pre>
<ul style="padding-left:0px;">The MP3 files used must be encoded according to the browser&#8217;s Flash Plugin limitations:</p>
<li style="margin-left:20px;list-style-type:disc;">Constant Bitrate Encoded.</li>
<li style="margin-left:20px;list-style-type:disc;">Sample Rate a multiple of 11,0025Hz. ie., 22,050Hz and 44,100Hz are valid sample rates.</li>
</ul>
<p>Please use the <a href="http://groups.google.com/group/jplayer" rel="nofollow">jPlayer Google Group</a> for bug reports and general discussion.</p>
<p>Mark P</p>
]]></content:encoded>
			<wfw:commentRss>http://happyworm.com/blog/2009/05/05/jplayer-the-css-styleable-jquery-mp3-player-plugin/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
