<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:planet="http://planet.intertwingly.net/" xmlns:indexing="urn:atom-extension:indexing" indexing:index="no"><access:restriction xmlns:access="http://www.bloglines.com/about/specs/fac-1.0" relationship="deny"/>
  <title>Planet HTML5</title>
  <subtitle>HTML5 News &amp; Views</subtitle>
  <updated>2009-07-11T02:34:57Z</updated>
  <generator uri="http://intertwingly.net/code/venus/">Venus</generator>
  <author>
    <name>Michael(tm) Smith</name>
    <email>mike@w3.org</email>
  </author>
  <id>http://www.w3.org/html/planet/atom.xml</id>
  <link href="http://www.w3.org/html/planet/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.w3.org/html/planet/" rel="alternate"/>

  <entry>
    <author>
      <name>Reddit: Browsers</name>
    </author>
    <id>http://www.reddit.com/r/browsers/comments/902hr/standardsnext_enabling_html5_amp_web_forms_20/</id>
    <link href="http://www.reddit.com/r/browsers/comments/902hr/standardsnext_enabling_html5_amp_web_forms_20/" rel="alternate" type="text/html"/>
    <title>Standards.next - Enabling HTML5 &amp; Web Forms 2.0 - Dean Edwards</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">submitted by <a href="http://www.reddit.com/user/realstevejobs"> realstevejobs </a> <br/> <a href="http://blip.tv/file/2299313">[link]</a> <a href="http://www.reddit.com/r/browsers/comments/902hr/standardsnext_enabling_html5_amp_web_forms_20/">[comment]</a></div>
    </summary>
    <updated>2009-07-10T17:42:52Z</updated>
    <source>
      <id>http://www.reddit.com/r/browsers/</id>
      <logo>http://thumbs.reddit.com/t5_2qh5r.png?v=ac2222c5990eb474100fb8ad5a34015c</logo>
      <author>
        <name>Reddit: Browsers</name>
      </author>
      <link href="http://www.reddit.com/r/browsers/" rel="alternate" type="text/html"/>
      <link href="http://reddit.com/r/browsers/.rss" rel="self" type="application/rss+xml"/>
      <subtitle>A reddit for posting news about browsers, browser technology and web standards. Anyone can post.</subtitle>
      <title>Browsers &amp; Browser technology</title>
      <updated>2009-07-10T19:34:20Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-11300808.post-1757645103469107361</id>
    <link href="http://googlecode.blogspot.com/feeds/1757645103469107361/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series-using.html#comment-form" rel="replies" type="text/html"/>
    <link href="http://www.blogger.com/feeds/11300808/posts/default/1757645103469107361?v=2" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/11300808/posts/default/1757645103469107361?v=2" rel="self" type="application/atom+xml"/>
    <link href="http://feedproxy.google.com/~r/blogspot/Dcni/~3/iPMCyBSNo6U/gmail-for-mobile-html5-series-using.html" rel="alternate" type="text/html"/>
    <title>Gmail for Mobile HTML5 Series: Using Timers Effectively</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><span style="font-style: italic; font-size: 85%;">On April 7th, Google launched a new version of Gmail for mobile for iPhone and Android-powered devices. We shared the behind-the-scenes story through </span><span style="background-color: rgb(255, 255, 255); font-style: italic; font-size: 85%;"><a href="http://google-code-updates.blogspot.com/2009/04/html5-and-webkit-pave-way-for-mobile.html" id="s8ja" title="this blog">this blog</a> </span><span style="font-style: italic; font-size: 85%;">and decided to share more of what we've learned in a brief series of follow-up blog posts. This week, I'll talk about two kinds of timers Javascript provides and how you can put them to good use in your own web applications.</span>   <div><br/></div><div><b>Javascript Timer API</b> </div> <div><br/></div> <div>   Timers provide a way to schedule a function to run at some later point in time. The two functions used to create timers are: </div> <div>    </div>  <ul><li><code>var id = setTimeout(fn, delay)</code> creates a timer which calls the specified function once after the given delay. </li><li><code>var id = setInterval(fn, delay)</code> is similar, but the function is called continually until the timer is canceled. </li></ul>   <div>    </div><div> Each type of timer has a corresponding <code>clear</code> method (e.g., <code>clearTimeout(id)</code>) that stops a timer while it is running. </div> <div><br/></div> <div> There are many great resources online already that document the nitty-gritty details of this API. That's not our focus here. Instead, I want to talk about specific ways in which you can put these timers to work for you in your web application. </div> <div><br/></div> <div><b>Let's Do the Time Warp Again</b> </div> <div><br/></div> <div>   It's important to keep in mind that just because you ask for a timer with a certain delay doesn't mean it will fire <i>precisely</i> that many milliseconds later. On current browsers, all Javascript code executes within a single thread. This means all your timers have to contend for execution time not only with each other, but also with all the other Javascript code in your application. If another block of code is in the middle of executing when a timer should fire, the timer will be delayed until that block of code is done. (Help is on the way: HTML5's <a href="http://www.whatwg.org/specs/web-workers/current-work/" id="dhdi" target="_blank" title="Web Workers">Web Workers</a> will allow web applications to spawn workers that run scripts in parallel.)</div> <div><br/></div> <div> Let's look at a concrete example of what this means in practice. I added a timer to Gmail for mobile that is supposed to fire every 200 ms. Each time it fires, it records the time between consecutive timer ticks. Here are the results after 100 ticks: </div><div/><br/><a href="http://4.bp.blogspot.com/_O05tjELC3Y8/Sk0IOo-CNcI/AAAAAAAAFtY/nha2BROMUgI/s1600-h/setinterval.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5353944579622188482" src="http://4.bp.blogspot.com/_O05tjELC3Y8/Sk0IOo-CNcI/AAAAAAAAFtY/nha2BROMUgI/s400/setinterval.png" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 186px;"/></a><br/><div><div> The dashed blue line represents the requested timer interval, 200 ms. Notice that the median was almost 50% higher than requested, at 276 ms; the time between ticks varied from 98 ms to almost 4 seconds, with an average delay of 493 ms.</div> <div><br/></div> <div> This highlights the fact that the interval at which your timer actually fires may differ greatly from the requested delay. In fact, the time between ticks is typically highly variable. It will fluctuate based on what else is happening in your application and on the device. Don't rely on your timer being precise!</div> <div><br/></div> <div><b>Buy One Timer, Get One Free?</b> </div> <div><br/></div> <div> When I first started working on the new version of Gmail for mobile, the application used only a couple of timers. As we continued adding more and more features, the number of timers grew. We were curious about the performance implications: would 10 concurrent timers make the app feel slow? How about 100? How would the performance of many low-frequency timers compare to a single high-frequency timer? </div> <div><br/></div> <div> To answer these questions, we conducted a few experiments. We injected some extra code into a development build of Gmail that created a lot of different timers, each of which just performed some simple calculations. Then we fired up the app on an iPhone 3G and Android G1 (both running the latest version of their respective firmware) and observed the performance. Note that although we could have just created a separate test page for this, we chose to inject the code right into our app so we could see how fast it would be to read and process mail with all those timers running. </div> <div><br/></div> <div> Here's what we learned. With low-frequency timers — timers with a delay of one second or more — we could create many timers without significantly degrading performance on either device. Even with 100 timers scheduled, our app was not noticeably less responsive. With high-frequency timers, however, the story was exactly the opposite. A few timers firing every 100-200 ms was sufficient to make our UI feel sluggish. </div><br/><div> This led us to take a mixed approach with the timers we use in our application. For timers that have a reasonably long delay, we just freely create new timers wherever they are needed. However, for timers that need to execute many times each second, we consolidate all of the work into a single global high-frequency timer. </div> <div><br/></div> <div><b>One High-Frequency Timer to Rule Them All</b> </div> <div><br/></div> <div> A global high-frequency timer strikes a balance between needing several different functions to execute frequently and application performance. The idea is simple: create a single timer in a central class that calls as many functions as required. Ours looks something like this: </div> <div><br/><pre><code><br/>var highFrequencyTimerId_ = window.setInterval(globalTimerCallback, 100);<br/><br/>globalTimerCallback = function() {<br/>navigationManager.checkHash();<br/>spinnerManager.spin();<br/>detectWakeFromSleep_();<br/>};<br/></code></pre><br/></div> <div> Why did we choose to hardcode the various function calls in <code>globalTimerCallback()</code> rather than implementing a more generic callback registration interface? Keep in mind that this code is going to execute many times every second. Looping over an array of registered callbacks might be slightly "cleaner" code, but it's critical that this function execute as quickly as possible. Hardcoding the function calls also makes it really easy to keep track of all the work that is being done within the timer.</div> <div><br/></div><b>To Die, To Sleep; To Sleep, Perchance to Tick</b> <div><br/></div> <div> One neat application of a high-frequency timer is to detect when the device has been woken from sleep. When your application is put to sleep — either because the device is put into sleep mode or because the user has navigated away from the browser to another application — time, as perceived by your app, pauses. No timers fire until the user navigates back to your app and it wakes up. By keeping a close eye on the actual time that elapses between high-frequency timer ticks, you can detect when the app wakes from sleep. </div> <div><br/></div> <div> First, create a high-frequency timer, as described above. In your timer, call a function that keeps track of the time between ticks: </div> <div><br/><pre><code><br/>// The time, in ms, that must be "missed" before we<br/>// assume the app was put to sleep.<br/>var THRESHOLD = 10000;<br/><br/>var lastTick_;<br/>detectWakeFromSleep_ = function() {<br/>var now = new Date().getTime();<br/>var delta = now - this.lastTick_;<br/>if (delta &gt; THRESHOLD) {<br/>  // The app probably just woke up after being asleep.<br/>  fetchUpdatedData();<br/>}<br/>lastTick_ = now;<br/>};<br/></code></pre><br/><div> Now your users will always have the latest data available when they return to your app without having to manually perform a refresh! </div> <div><br/></div>  I hope this helps you make the most of timers in your web application. Stay tuned for the next post, where we'll discuss some cool tricks to spice up the text areas on your forms.<br/><div><em><em><br/></em></em><i>Previous posts from Gmail for Mobile HTML5 Series</i><br/><i><a href="http://google-code-updates.blogspot.com/2009/04/html5-and-webkit-pave-way-for-mobile.html" id="e4x7" title="HTML5 and Webkit pave the way for mobile web applications">HTML5 and Webkit pave the way for mobile web applications</a><br/><a href="http://google-code-updates.blogspot.com/2009/04/gmail-for-mobile-html5-series-using.html" id="ye:o" title="Using AppCache to launch offline - Part 1">Using AppCache to launch offline - Part 1</a><br/><a href="http://google-code-updates.blogspot.com/2009/05/gmail-for-mobile-html5-series-part-2.html" id="b52e" title="Using AppCache to launch offline - Part 1">Using AppCache to launch offline - Part 2</a><br/><a href="http://google-code-updates.blogspot.com/2009/05/gmail-for-mobile-html5-series-part-3.html" id="moyw" title="Using AppCache to launch offline - Part 1">Using AppCache to launch offline - Part 3</a><br/><a href="http://google-code-updates.blogspot.com/2009/05/gmail-for-mobile-html5-series-common.html" id="vn-v" title="A Common API for Web Storage">A Common API for Web Storage</a><br/><a href="http://google-code-updates.blogspot.com/2009/06/gmail-for-mobile-html5-series.html" id="oi0j" title="Suggestions for better performance">Suggestions for better performance</a></i><br/><a href="http://googlecode.blogspot.com/2009/06/gmail-for-mobile-html5-series-cache.html" id="j61o" title="Cache pattern for offline HTML5 web application">Cache pattern for offline HTML5 web application</a><em><em><a href="http://googlecode.blogspot.com/2009/06/gmail-for-mobile-html5-series-cache.html" id="j61o" title="Cache pattern for offline HTML5 web application"/><br/></em></em></div><em><em>    </em></em></div><em><em><br/><span class="byline-author" style="font-style: italic;">By Neil Thomas, Software Engineering Intern, Google Mobile<br/></span></em></em></div><div class="blogger-post-footer"><img height="1" src="https://blogger.googleusercontent.com/tracker/11300808-1757645103469107361?l=googlecode.blogspot.com" width="1"/></div><img height="1" src="http://feeds.feedburner.com/~r/blogspot/Dcni/~4/iPMCyBSNo6U" width="1"/></div>
    </content>
    <updated>2009-07-10T15:22:30Z</updated>
    <published>2009-07-02T19:20:00Z</published><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series-using.html</feedburner:origlink>
    <author>
      <name>Christine Songco</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/00623754935378912186</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-11300808</id>
      <author>
        <name>Chris DiBona</name>
        <email>noreply@blogger.com</email>
      </author>
      <link href="http://googlecode.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://googlecode.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://www.blogger.com/feeds/11300808/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" rel="next" type="application/atom+xml"/>
      <link href="http://feeds.feedburner.com/blogspot/Dcni" rel="self" type="application/atom+xml"/>
      <subtitle>Updates from Google's open source projects.</subtitle>
      <title>Google Code Blog</title>
      <updated>2009-07-10T15:22:30Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://stackoverflow.com/questions/1105257/whats-the-proper-way-to-add-facebook-connect-and-their-xmlns-to-xhtml5</id>
    <link href="http://stackoverflow.com/questions/1105257/whats-the-proper-way-to-add-facebook-connect-and-their-xmlns-to-xhtml5" rel="alternate" type="text/html"/>
    <title>What's the proper way to add Facebook Connect and their xmlns to (X)HTML5?</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I'm gleaning from this question [<a href="http://stackoverflow.com/questions/599334/facebook-connect-wont-validate" rel="nofollow">http://stackoverflow.com/questions/599334/facebook-connect-wont-validate</a>] that using Facebook Connect and other facebook 'social widgets' just doesn't result in a 'valid' document. </p>

<p>Concerning (X)HTML5, however, what would be the (most) appropriate doctype/header if I want to include Facebook Connect content on my pages, and be as close to 'valid' (X)HTML5 as possible?</p></div>
    </summary>
    <updated>2009-07-09T19:43:32Z</updated>
    <published>2009-07-09T17:13:24Z</published>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="facebook-connect"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="doctype"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="html5"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="xhtml5"/>
    <author>
      <name>anonymous coward</name>
    </author>
    <source>
      <id>http://stackoverflow.com/feeds/tag/html5</id>
      <link href="http://stackoverflow.com/feeds/tag/html5" rel="self" type="application/atom+xml"/>
      <link href="http://stackoverflow.com/questions/tagged/html5" rel="alternate" type="text/html"/>
      <link href="http://www.creativecommons.org/licenses/by-nc/2.5/rdf" rel="license"/>
      <subtitle>most recent 30 from stackoverflow.com</subtitle>
      <title>html5 Questions - Stack Overflow</title>
      <updated>2009-07-11T02:34:25Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://stackoverflow.com/questions/1016515/html-5-early-adoption-where-possible-good-or-bad</id>
    <link href="http://stackoverflow.com/questions/1016515/html-5-early-adoption-where-possible-good-or-bad" rel="alternate" type="text/html"/>
    <title>HTML 5 - Early Adoption Where Possible - Good or Bad?</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>This question was inspired a bit by <a href="http://stackoverflow.com/questions/992115/custom-attributes-yay-or-nay" rel="nofollow">this question</a>, in which the most upvoted answer recommended using a feature from HTML 5.  It certainly seemed to be a good method to me, but it made me curious about using features from a future spec in general.</p>

<p>HTML 5 offers a lot of nice improvements, many of which can be used without causing problems in current browsers.  </p>

<p>Some examples:</p>

<pre><code>// new, simple HTML5 doctype (puts browsers in standards mode)
&lt;!doctype HTML&gt;

// new input types,  for easy, generic client side validation
&lt;input type="email" name="emailAddress"/&gt;
&lt;input type="number" name="userid"/&gt;
&lt;input type="date" name="dateOfBirth"/&gt;

// new "required" attribute indicates that a field is required
&lt;input type="text" name="userName" required="true"/&gt;

// new 'data-' prefixed attributes
// for easy insertion of js-accessible metadata in dynamic pages
&lt;div data-price="33.23"&gt; 
    &lt;!-- --&gt;
&lt;/div&gt;
&lt;button data-item-id="93024"&gt;Add Item&lt;/button&gt;
</code></pre>

<p>Many of these new features are designed to make it possible for browsers to automatically validate forms, as well as give them better inputs (for example a date picker).   Some are just convenient and seem like a good way to get ready for the future.</p>

<p>They currently don't break anything (as far as I can tell) in current browsers and they allow for clean, generic clientside code.</p>

<p>However, even though they are all valid in HTML 5, they are NOT valid for HTML 4, and HTML 5 is still a draft at this point.</p>

<p><strong>Is it a good idea to go ahead and use these features early?</strong>  </p>

<p>Are there browser implementation issues with them that I haven't realized?   </p>

<p>Should we be developing web pages now that make use of HTML 5 draft features?</p></div>
    </summary>
    <updated>2009-07-09T18:24:46Z</updated>
    <published>2009-06-19T05:55:57Z</published>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="html5"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="early-adoption"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="cross-browser"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="w3c-validation"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="specifications"/>
    <author>
      <name>TM</name>
    </author>
    <source>
      <id>http://stackoverflow.com/feeds/tag/html5</id>
      <link href="http://stackoverflow.com/feeds/tag/html5" rel="self" type="application/atom+xml"/>
      <link href="http://stackoverflow.com/questions/tagged/html5" rel="alternate" type="text/html"/>
      <link href="http://www.creativecommons.org/licenses/by-nc/2.5/rdf" rel="license"/>
      <subtitle>most recent 30 from stackoverflow.com</subtitle>
      <title>html5 Questions - Stack Overflow</title>
      <updated>2009-07-11T02:34:25Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://ajaxian.com/?p=7067</id>
    <link href="http://feedproxy.google.com/~r/ajaxian/~3/6UUH9R8Pec8/jquery-visualize-updated-accessible-charts-and-graphs" rel="alternate" type="text/html"/>
    <title>jQuery Visualize: Updated accessible charts and graphs</title>
    <summary>Scott Jehl has released jQuery Visualize, the plugin that groks HTML tables and generates lovely charts from it, all from a simple $('table').visualize(); (lot's of options for you to twiddle too if you want).
First, you create a bog standard table like:
PLAIN TEXT
HTML:




 


&lt;table&gt;


        &lt;caption&gt;2009 Individual Sales by Category&lt;/caption&gt;


        &lt;thead&gt;


    [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Scott Jehl has <a href="http://www.filamentgroup.com/lab/jquery_visualize_plugin_accessible_charts_graphs_from_tables_html5_canvas/">released jQuery Visualize</a>, the plugin that groks HTML tables and generates lovely charts from it, all from a simple <code>$('table').visualize();</code> (lot's of options for you to twiddle too if you want).</p>
<p>First, you create a bog standard table like:</p>
<div class="igBar"><a href="javascript:showCodeTxt('html-14');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color: #000000; font-weight: bold;">HTML:</span>
<div id="html-14">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/table.html"><span style="color: #000000; font-weight: bold;">&lt;table&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #009900;"><a href="http://december.com/html/4/element/caption.html"><span style="color: #000000; font-weight: bold;">&lt;caption&gt;</span></a></span>2009 Individual Sales by Category<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/caption&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #009900;"><a href="http://december.com/html/4/element/thead.html"><span style="color: #000000; font-weight: bold;">&lt;thead&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>food<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>auto<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>household<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>furniture<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>kitchen<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>bath<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span>/thead&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #009900;"><a href="http://december.com/html/4/element/tbody.html"><span style="color: #000000; font-weight: bold;">&lt;tbody&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>Mary<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>150<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>160<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>40<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>120<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>30<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>70<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>Tom<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>40<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>30<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>45<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>35<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                        <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>49<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">                ...repetitive rows removed for brevity. </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tbody&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/table&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div>
</li>
</ol>
</div>
</div>
</div>
<p>Then you <a href="http://www.filamentgroup.com/examples/charting_v2/">visualize</a> it. You end up with pretty graphs like these:</p>
<p><img alt="" class="alignnone size-full wp-image-7068" height="747" src="http://ajaxian.com/wp-content/uploads/jqueryvisualize.png" title="jqueryvisualize" width="500"/></p>
</div>
    </content>
    <updated>2009-07-09T14:06:41Z</updated>
    <category term="Canvas"/>
    <category term="Front Page"/>
    <category term="jQuery"/><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://ajaxian.com/archives/jquery-visualize-updated-accessible-charts-and-graphs</feedburner:origlink>
    <author>
      <name>Dion Almaer</name>
    </author>
    <source>
      <id>http://ajaxian.com</id>
      <link href="http://ajaxian.com" rel="alternate" type="text/html"/>
      <link href="http://ajaxian.com/index.xml" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com" rel="hub" type="text/html"/>
      <subtitle>Cleaning up the web with Ajax</subtitle>
      <title>Ajaxian » Front Page</title>
      <updated>2009-07-10T11:18:53Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://ajaxian.com/?p=7070</id>
    <link href="http://feedproxy.google.com/~r/ajaxian/~3/cWlbIrxwpps/lessons-from-gmail-using-timers-effectively" rel="alternate" type="text/html"/>
    <title>Lessons from Gmail: Using Timers Effectively</title>
    <summary>Neil Thomas of the Gmail for Mobile team keeps coming with great information on lessons learned. The latest discusses timers, and how to use them effectively (setTimeout/setInterval).
There are old questions here.... should you use lots of timers, or use one uber-timer that coordinates life? Here are some thoughts from Neil:

When I first started working on [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Neil Thomas of the Gmail for Mobile team keeps coming with great information on lessons learned. The latest discusses <a href="http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series-using.html">timers, and how to use them effectively</a> (setTimeout/setInterval).</p>
<p>There are old questions here.... should you use lots of timers, or use one uber-timer that coordinates life? Here are some thoughts from Neil:</p>
<blockquote><p>
When I first started working on the new version of Gmail for mobile, the application used only a couple of timers. As we continued adding more and more features, the number of timers grew. We were curious about the performance implications: would 10 concurrent timers make the app feel slow? How about 100? How would the performance of many low-frequency timers compare to a single high-frequency timer?</p>
<p>To answer these questions, we conducted a few experiments. We injected some extra code into a development build of Gmail that created a lot of different timers, each of which just performed some simple calculations. Then we fired up the app on an iPhone 3G and Android G1 (both running the latest version of their respective firmware) and observed the performance. Note that although we could have just created a separate test page for this, we chose to inject the code right into our app so we could see how fast it would be to read and process mail with all those timers running.</p>
<p>Here's what we learned. With low-frequency timers — timers with a delay of one second or more — we could create many timers without significantly degrading performance on either device. Even with 100 timers scheduled, our app was not noticeably less responsive. With high-frequency timers, however, the story was exactly the opposite. A few timers firing every 100-200 ms was sufficient to make our UI feel sluggish.</p>
<p>This led us to take a mixed approach with the timers we use in our application. For timers that have a reasonably long delay, we just freely create new timers wherever they are needed. However, for timers that need to execute many times each second, we consolidate all of the work into a single global high-frequency timer.
</p></blockquote>
<p>He then goes on to discuss the nice trick to tell if an application has come back from a sleeping state (and thus, maybe you want to call home and sync):</p>
<blockquote><p>
One neat application of a high-frequency timer is to detect when the device has been woken from sleep. When your application is put to sleep — either because the device is put into sleep mode or because the user has navigated away from the browser to another application — time, as perceived by your app, pauses. No timers fire until the user navigates back to your app and it wakes up. By keeping a close eye on the actual time that elapses between high-frequency timer ticks, you can detect when the app wakes from sleep.</p>
<p>First, create a high-frequency timer, as described above. In your timer, call a function that keeps track of the time between ticks:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-16');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color: #000000; font-weight: bold;">JAVASCRIPT:</span>
<div id="javascript-16">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// The time, in ms, that must be "missed" before we</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// assume the app was put to sleep.</span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> THRESHOLD = <span style="color: #800000;">10000</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> lastTick_;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">detectWakeFromSleep_ = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> <span style="color: #006600; font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> now = <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span>.<span style="color: #006600;">getTime</span><span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> delta = now - <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">lastTick_</span>;</div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #006600; font-weight: bold;">(</span>delta&gt; THRESHOLD<span style="color: #006600; font-weight: bold;">)</span> <span style="color: #006600; font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">   <span style="color: #009900; font-style: italic;">// The app probably just woke up after being asleep.</span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">   fetchUpdatedData<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #006600; font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> lastTick_ = now;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal; color: #3A6A8B;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #006600; font-weight: bold;">}</span>;</div>
</li>
<li style="font-weight: bold; color: #26536A;">
<div style="color: #000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div>
</li>
</ol>
</div>
</div>
</div>
<p>Now your users will always have the latest data available when they return to your app without having to manually perform a refresh!
</p></blockquote>
<p>We recently ran into timer fun, as Ben mentioned on his <a href="http://ajaxian.com/archives/open-web-tools-directory">directory post</a>. He put together a <a href="http://tools.mozilla.com/js/timing.js">nice little timing framework</a> that is DOM agnostic that lets you have some fun with setting frameworks. There are other frameworks out there of course, especially when you get into the DOM (dojo.Animation can be used in the abstract, and there are then DOM specific impls on top).</p>
<p><a href="http://weblogs.mozillazine.org/roc/">Robert O'Callahan</a> has been playing around with the idea of a framework in the browser too, with <code>mozRequestAnimationFrame</code>. Fun :)</p>
</div>
    </content>
    <updated>2009-07-09T11:13:04Z</updated>
    <category term="Front Page"/>
    <category term="JavaScript"/><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://ajaxian.com/archives/lessons-from-gmail-using-timers-effectively</feedburner:origlink>
    <author>
      <name>Dion Almaer</name>
    </author>
    <source>
      <id>http://ajaxian.com</id>
      <link href="http://ajaxian.com" rel="alternate" type="text/html"/>
      <link href="http://ajaxian.com/index.xml" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com" rel="hub" type="text/html"/>
      <subtitle>Cleaning up the web with Ajax</subtitle>
      <title>Ajaxian » Front Page</title>
      <updated>2009-07-10T11:18:53Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://hacks.mozilla.org/?p=1344</id>
    <link href="http://hacks.mozilla.org/2009/07/working-smarter-not-harder/" rel="alternate" type="text/html"/>
    <title xml:lang="en">using web workers: working smarter, not harder</title>
    <summary xml:lang="en">This article is written by Malte Ubl, who has done a lot of great work with using Web Workers as part of the bespin project.

In recent years, the user experience of web applications has grown richer and richer. In-browser applications like GMail, Meebo and Bespin give us an impression of how the web will look [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p><em>This article is written by <a href="http://www.nonblocking.io/">Malte Ubl</a>, who has done a lot of great work with <a href="http://www.nonblocking.io/search/label/WebWorkers">using Web Workers</a> as part of the <a href="https://bespin.mozilla.com/">bespin</a> project.<br/>
</em><br/>
In recent years, the user experience of web applications has grown richer and richer. In-browser applications like <a href="http://mail.google.com/">GMail</a>, <a href="http://www.meebo.com/">Meebo</a> and <a href="https://bespin.mozilla.com/">Bespin</a> give us an impression of how the web will look and feel in the future. One of the key aspects of creating a great user experience is to build applications that are highly responsive. Users hate to wait and they hate those moments where an application seems to work for a while, then stops responding to their input.</p>
<p>At the core of modern client-side web applications lies the JavaScript programming language. JavaScript and the DOM that it talks to is inherently single-threaded. This means that in JavaScript only one thing can happen at any given time. Even if your computer has 32 cores it will keep only one of those cores busy when it’s doing a long computation.  For example if you calculate the perfect trajectory to get to the moon it won’t be able to render an animation that shows the trajectory at the same time and it won’t be able to react to any user events like clicks or typing on the keyboard while it’s doing that calculation.</p>
<p><strong>Concurrency</strong></p>
<p>To maintain responsiveness while performing intense computations <i>concurrency</i> is a part of most modern programming languages. In the past concurrency was often achieved by the use of <i><a href="http://en.wikipedia.org/wiki/Thread_%28computer_science%29">threads</a></i>. Threads, however, make it increasingly hard for the programmer to understand the program flow which often leads to very hard to understand bugs and chaotic behavior when different threads manipulate the same data simultaneously.</p>
<p>Web Workers, which were <a href="http://www.whatwg.org/specs/web-workers/current-work/">recommended</a> by the <a href="http://www.whatwg.org/">WHATWG</a>, were introduced in Firefox 3.5 to add concurrency to JavaScript applications without also introducing the problems associated with multithreaded programs. Starting a worker is easy - just use the new Worker interface.</p>
<p>In this example the worker.js file will be loaded and the a new thread will be created to execute that code.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;"><span style="color: #006600; font-style: italic;">// Start worker from file "worker.js"</span>
<span style="color: #003366; font-weight: bold;">var</span> worker <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Worker<span style="color: #009900;">(</span><span style="color: #3366CC;">"worker.js"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></pre></div></div>

<p>Communication between the main UI thread and workers is done by passing messages using the postMessage method. postMessage was added for cross-window communication in Firefox 3. To send a message from the worker back to the page, you just post a message:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;"><span style="color: #006600; font-style: italic;">// Send a message back to the main UI thread</span>
postMessage<span style="color: #009900;">(</span><span style="color: #3366CC;">"Hello Page!"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></pre></div></div>

<p>To catch the message from the worker, you define an “onmessage” callback on the worker object. Here we just alert the event data that is passed to the callback function. In this case, “event.data” contains the “Hello Page!” string that was sent above.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;">worker.<span style="color: #660066;">onmessage</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">(</span>event<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
  <span style="color: #000066;">alert</span><span style="color: #009900;">(</span>event.<span style="color: #660066;">data</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">// Send a message to the worker</span>
  worker.<span style="color: #660066;">postMessage</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Hello Worker"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span></pre></div></div>

<p>To send a message to the worker we call the postMessage method on the worker object. To receive these messages inside the worker, simply define an onmessage function that will be called every time a message is posted to the worker.</p>
<p><strong>Error Handling</strong></p>
<p>There are two levels at which you can recover from runtime errors that occur in a worker. First, you can define an onerror function within the worker. Second, you can handle errors from the outside the worker by attaching an onerror handler on to the worker object:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;">worker.<span style="color: #000066;">onerror</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">(</span>event<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
  <span style="color: #000066;">alert</span><span style="color: #009900;">(</span>event.<span style="color: #660066;">message</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
  event.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span></pre></div></div>

<p>The event.preventDefault() method prevents the default action, which would be to display the error to the user or at least show it in the error console. Here we alert the error message instead.</p>
<p><strong>Shared Nothing</strong></p>
<p>Workers share absolutely no state with the page they are associated with or with any other workers; the only way they can interact at all is through postMessage. Workers also have no access to the DOM, so they can not directly manipulate the web page. There is thus no risk of problems with data integrity when multiple workers want to manipulate the same data at once.</p>
<p>A standard setup that is using workers would consist of a page JavaScript component that is listening for user events. When an event occurs that triggers an intensive calculation a message is sent to the worker which then starts the computation. The script on the page, however, can terminate immediately and listen for more user events. As soon as the worker is done, it sends a return message to the page which can then, for example, display the result.</p>
<div style="margin-left: 30px; margin-right: 30px;">
<img class="alignnone size-full wp-image-1346" height="78" src="http://hacks.mozilla.org/wp-content/uploads/2009/07/never-again.jpg" width="370"/><br/>
The unresponsive script warning that is being displayed by browsers when a script is taking a long time to execute is a thing of the past when using web workers.
</div>
<p><strong>The Fibonacci Example</strong></p>
<p>Next is an example of a worker that calculates the Fibonacci numbers from 0 to 99 in the background. Actually, because calculating Fibonacci numbers using this very inefficient method can take a lot of time for larger numbers (as in greater than something like 30) the script might never finish on your computer (or crash because it blows out the stack), but when doing it in a worker this has no effect on the responsiveness of the main web page. So you can still draw a complex animation to make the waiting time for the next number a little more fun.</p>
<p>This HTML page contains a script that starts a worker from the file “fib-worker.js”. Messages from the worker are displayed on the browser’s console using console.log.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family: monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Web Worker API Demo<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"text/javascript"</span>&gt;</span>
        var worker = new Worker("fib-worker.js");
        worker.onmessage = function (event) {
          console.log(event.data.index +" -&gt; " + event.data.value)
        }
      <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>  
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>The JavaScript file that implements the worker contains a loop that calculates Fibonacci numbers and sends the result to the page.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;"><span style="color: #006600; font-style: italic;">// File fib-worker.js</span>
<span style="color: #003366; font-weight: bold;">function</span> fib<span style="color: #009900;">(</span>n<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
   <span style="color: #000066; font-weight: bold;">return</span> n <span style="color: #339933;">&lt;</span> 2 <span style="color: #339933;">?</span> n <span style="color: #339933;">:</span> fib<span style="color: #009900;">(</span>n<span style="color: #339933;">-</span>1<span style="color: #009900;">)</span> <span style="color: #339933;">+</span> fib<span style="color: #009900;">(</span>n<span style="color: #339933;">-</span>2<span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span>
 
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">(</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">100</span><span style="color: #339933;">;</span> <span style="color: #339933;">++</span>i<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
   postMessage<span style="color: #009900;">(</span><span style="color: #009900;">{</span>
      index<span style="color: #339933;">:</span> i<span style="color: #339933;">,</span>
      value<span style="color: #339933;">:</span> fib<span style="color: #009900;">(</span>i<span style="color: #009900;">)</span>
   <span style="color: #009900;">}</span><span style="color: #009900;">)</span>
<span style="color: #009900;">}</span></pre></div></div>

<p>In the example above we see that we can also pass complex objects to the postMessage. These objects can contain everything that can be transmitted via <a href="http://json.org/">JSON</a>. This means that functions cannot be passed across worker boundaries and that the objects are passed by value rather than by reference.</p>
<p><strong>Worker APIs</strong></p>
<p>Workers support a function called importScripts. You can use this to load more source files into the worker.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;">importScripts<span style="color: #009900;">(</span><span style="color: #3366CC;">"file.js"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
importScripts<span style="color: #009900;">(</span><span style="color: #3366CC;">"foo.js"</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">"bar.js"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></pre></div></div>

<p>When you pass multiple parameters to the function the scripts will be downloaded in parallel but executed in the order of definition. The function does not return until all scripts have been downloaded and executed.</p>
<p>Here we load an external JavaScript file that calculates <a href="http://en.wikipedia.org/wiki/SHA-1">SHA-1</a> hash sums from strings and then we use it to hash responses from AJAX requests. We also use the standard <a href="https://developer.mozilla.org/en/XmlHttpRequest">XMLHttpRequest</a> object to retrieve the content of the URL which is passed in via the onmessage event. The interesting part is that we don’t have to worry about making the AJAX request asynchronous because the worker itself is asynchronous with respect to page rendering, so a little waiting for the HTTP request does not hurt as much.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;">importScripts<span style="color: #009900;">(</span><span style="color: #3366CC;">"sha1.js"</span><span style="color: #009900;">)</span>
 
<span style="color: #003366; font-weight: bold;">function</span> onmessage<span style="color: #009900;">(</span>event<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
    <span style="color: #003366; font-weight: bold;">var</span> xhr <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> XMLHttpRequest<span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
    xhr.<span style="color: #000066;">open</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'GET'</span><span style="color: #339933;">,</span> event.<span style="color: #660066;">data</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
    xhr.<span style="color: #660066;">send</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
    postMessage<span style="color: #009900;">(</span>sha1<span style="color: #009900;">(</span>xhr.<span style="color: #660066;">responseText</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span></pre></div></div>

<p><strong>Other APIs Available to Workers</strong></p>
<p>Workers may use XMLHttpRequest for AJAX requests as seen above and access the client sided database using <a href="https://developer.mozilla.org/en/Storage">web storage API</a>. Here the APIs are identical to their usage in regular JavaScript.</p>
<p>The setTimeout and setInterval (and the clearTimeout and clearInterval friends) functions, which enable executing code after a given period of time or at certain intervals, are also available within the worker as is the well known <a href="https://developer.mozilla.org/en/DOM/window.navigator">navigator object</a>, which can be inspected to get information about the current browser.</p>
<p>More APIs may be added in the future.</p>
<p><strong>Browser Compatibility</strong></p>
<p>As of this writing (and to the knowledge of the author), Firefox 3.5 is the only browser that supports the ability to pass complex objects via postMessage and that implements the extended APIs defined above. Safari 4 implements a very basic version of the Worker API. For other browsers it is possible to use Workers via <a href="http://gears.google.com/">Google Gears</a>, which originally introduced the concept to browsers.</p>
<p><strong>Real World Usage</strong></p>
<p>In the <a href="https://bespin.mozilla.com/">Bespin project</a>, which is a browser based source code editor, we successfully used workers to implement CPU intensive features like real-time source code error checking and code completion. We also created <a href="http://www.nonblocking.io/2009/03/offloading-arbitrary-js-objects-to.html">a shim</a> that implements the Worker API in terms of Google Gears and which adds the missing features to the worker implementation of Safari 4 and also <a href="http://www.nonblocking.io/2009/05/one-event-loop-to-rule-them-all.html">moved to using transparent custom events</a> on top of the postMessage interface. These components will be released as a stand-alone library to be usable in other projects in the future.</p>
<p>Web Workers will play an important role in making the Open Web an even more powerful platform for sophisticated applications. Because in the end all they do is execute JavaScript, it’s easy to make scripts work on clients which do yet have the luxury of web workers. So go ahead and add them to your applications today to make them feel just a little more responsive and more pleasant to use.</p></div>
    </content>
    <updated>2009-07-09T00:42:54Z</updated>
    <category term="35 Days"/>
    <category term="DOM"/>
    <category term="Feature"/>
    <category term="JavaScript"/>
    <category term="Standards"/>
    <author>
      <name>Eric Shepherd</name>
    </author>
    <source>
      <id>http://hacks.mozilla.org</id>
      <link href="http://hacks.mozilla.org/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://hacks.mozilla.org" rel="alternate" type="text/html"/>
      <title xml:lang="en">hacks.mozilla.org</title>
      <updated>2009-07-09T10:33:37Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://stackoverflow.com/questions/1086886/html-5-video-tag-vs-flash-video-what-are-the-pros-and-cons</id>
    <link href="http://stackoverflow.com/questions/1086886/html-5-video-tag-vs-flash-video-what-are-the-pros-and-cons" rel="alternate" type="text/html"/>
    <title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">HTML 5 <video> tag vs Flash video. What are the pros and cons?</video></div>
    </title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Seems like the new <code>&lt;video&gt;</code> tag is all the hype these days, especially since Firefox now supports it. News of this are popping up in blogs all over the place, and everyone seems to be excited. But what about?</p>

<p>As much as I searched I could not find anything that would make it better than the good old Flash video. In fact, I see only problems with it:</p>

<ul>
<li>It will still be some time before all the browsers start supporting it, and much more time before most people upgrade;</li>
<li>Flash is available already and everyone has it;</li>
<li>You can couple flash with whatever fancy UI you want for controlling the playback. I gather that the  tag will be controllable as well (via JS probably), but will it be able to go fullscreen?</li>
</ul>

<p>The only two pros for a <code>&lt;video&gt;</code> tag that I can see are:</p>

<ul>
<li>It is more "semantic" - which probably holds no importance to a whole lot of people, including me;</li>
<li>It is not dependant of a single commercial 3rd party entity (Adobe) - which I also don't see as a compelling reason to switch, because free players and video convertors are already available, and Adobe is not hindering the whole process in any way (it's not in their interests even).</li>
</ul>

<p>So... what's the big deal?</p>

<p><strong>Added:</strong></p>

<p>OK, so there is one more Pro... maybe. Support for mobile devices. Hard to say though. A number of thoughts race through my head about the subject:</p>

<ul>
<li>How many mobile devices are actually able to decode video at a decent speed anyway, flash or otherwise?</li>
<li>How long until mainstream mobile devices get the <code>&lt;video&gt;</code> support? Even if it is available through updates, how many people actually do that?</li>
<li>How many people watch videos on webpages on their mobile phones at all?</li>
</ul>

<p>As for the semantics part - I understand that search engines might be able to detect videos better now, but... what will they do with them anyway? OK, so they know that there is a video in the page. And? They can't index a video! I'd like some more arguments here.</p>

<p><strong>Added:</strong></p>

<p>Just thought of another Cons. This opens up a whole new area of cross-browser incompatibility. HTML and CSS is quite messy already in this aspect. Flash at least is the same everywhere. But it's enough for at least one major browser vendor to decide against the <code>&lt;video&gt;</code> tag (can anyone say "Internet Explorer"?) and we have a nice new area of hell to explore.</p>

<p><strong>Added:</strong></p>

<p>A Pro just came in. More competition = more innovation. That's true. Giving Adobe more competition will probably force them to improve Flash in areas it has been lacking so far. Linux seems to be a weak spot for it, cited by many.</p></div>
    </summary>
    <updated>2009-07-08T20:57:33Z</updated>
    <published>2009-07-06T13:14:11Z</published>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="html5"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="video"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="flash"/>
    <author>
      <name>Vilx-</name>
    </author>
    <source>
      <id>http://stackoverflow.com/feeds/tag/html5</id>
      <link href="http://stackoverflow.com/feeds/tag/html5" rel="self" type="application/atom+xml"/>
      <link href="http://stackoverflow.com/questions/tagged/html5" rel="alternate" type="text/html"/>
      <link href="http://www.creativecommons.org/licenses/by-nc/2.5/rdf" rel="license"/>
      <subtitle>most recent 30 from stackoverflow.com</subtitle>
      <title>html5 Questions - Stack Overflow</title>
      <updated>2009-07-11T02:34:25Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://stackoverflow.com/questions/1100336/sending-a-message-to-all-open-windows-tabs-using-javascript</id>
    <link href="http://stackoverflow.com/questions/1100336/sending-a-message-to-all-open-windows-tabs-using-javascript" rel="alternate" type="text/html"/>
    <title>Sending a message to all open windows/tabs using JavaScript</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I hear HTML5 has <code>window.postMessage()</code>, but it seems to require having a handle on the window (or tab, throughout this question) you're posting the message to.  What if I want to broadcast to all open windows?  Is this possible?</p>

<p>(What I'm trying to do is warn other windows without any server round-trips when a user does something in one window that affects the others, so that they can update their content.  However, while some windows may be opened from existing ones--allowing me to intercept and store references to them--some fresh windows may be opened manually by the user and then a bookmark selected or URL typed in.  In this case there doesn't seem to be a way to intercept and store references.)</p></div>
    </summary>
    <updated>2009-07-08T20:35:03Z</updated>
    <published>2009-07-08T20:20:53Z</published>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="javascript"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="html5"/>
    <category scheme="http://stackoverflow.com/feeds/tag/html5/tags" term="cross-window-scripting"/>
    <author>
      <name>Kev</name>
    </author>
    <source>
      <id>http://stackoverflow.com/feeds/tag/html5</id>
      <link href="http://stackoverflow.com/feeds/tag/html5" rel="self" type="application/atom+xml"/>
      <link href="http://stackoverflow.com/questions/tagged/html5" rel="alternate" type="text/html"/>
      <link href="http://www.creativecommons.org/licenses/by-nc/2.5/rdf" rel="license"/>
      <subtitle>most recent 30 from stackoverflow.com</subtitle>
      <title>html5 Questions - Stack Overflow</title>
      <updated>2009-07-11T02:34:25Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blog.whatwg.org/?p=911</id>
    <link href="http://blog.whatwg.org/test-html5-parsing/feed" rel="replies" type="application/atom+xml"/>
    <link href="http://blog.whatwg.org/test-html5-parsing" rel="alternate" type="text/html"/>
    <title xml:lang="en">Help Test HTML5 Parsing in Gecko</title>
    <summary xml:lang="en">The HTML5 parsing algorithm is meant to demystify HTML parsing and
make it uniform across implementations in a backwards-compatible way.
The algorithm has had “in the lab” testing, but so far it hasn’t
been tested inside a browser by a large number of people. You
can help change that now!
A while ago, an implementation of the HTML5 parsing algorithm
landed [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>The HTML5 parsing algorithm is meant to demystify HTML parsing and
make it uniform across implementations in a backwards-compatible way.
The algorithm has had “in the lab” testing, but so far it hasn’t
been tested inside a browser by a large number of people. <em>You</em>
can help change that now!</p>
<p>A while ago, an implementation of the HTML5 parsing algorithm
landed on <a href="http://hg.mozilla.org/mozilla-central/">mozilla-central</a>
preffed off. Anyone who is testing Firefox nightly builds can now opt
to turn on the HTML5 parser and test it.</p>
<h2>How to Participate?</h2>
<p>First, this isn’t release-quality software. Testing the HTML5
parser carries all the same risks as testing a nightly build in
general, and then some. It may crash, it may corrupt your Firefox
profile, etc. If you aren’t comfortable with taking the risks
associated with running nighly builds, you shouldn’t participate.</p>
<p>If you are still comfortable with testing, download a trunk
<a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/">nightly
build</a>, run it, navigate to <code>about:config</code> and flip the
preference named <code>html5.enable</code> to <code>true</code>. This
makes Gecko use the HTML5 parser when loading pages into the content
area and when setting <code>innerHTML</code>. The HTML5 parser is not
used for HTML embedded in feeds, Netscape bookmark import, View
Source, etc., yet.</p>
<p>The <code>html5.enable</code> preference doesn’t require a
restart to take effect. It takes effect the next time you load a
page.</p>
<h2>What to Test?</h2>
<p>The main thing is getting the HTML5 parser exposed to a wide range
of real Web content that people browse. This may turn up crashes or
compatibility problems. 
</p>
<p>So the way to help is to use nightly builds with the HTML5 parser
for browsing as usual. If you see no difference, things are going
well! If you see a page misbehaving—or, worse, crashing—with the
HTML5 parser turned on but not with it turned off, please report the
problem.</p>
<h2>Reporting Bugs</h2>
<p>Please file bugs in <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&amp;component=HTML:+Parser&amp;short_desc=%5BHTML5%5D+">the
“Core” product under “HTML: Parser” component with “[HTML5]
” at the start of the summary</a>.</p>
<h2>Known Problems</h2>
<p>First and foremost, please refer to the <a href="https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&amp;short_desc_type=substring&amp;short_desc=%5BHTML5%5D+&amp;classification=Components&amp;product=Core&amp;component=HTML:+Parser&amp;long_desc_type=substring&amp;long_desc=&amp;bug_file_loc_type=allwordssubstr&amp;bug_file_loc=&amp;status_whiteboard_type=allwordssubstr&amp;status_whiteboard=&amp;keywords_type=allwords&amp;keywords=&amp;resolution=DUPLICATE&amp;resolution=---&amp;emailassigned_to1=1&amp;emailtype1=exact&amp;email1=&amp;emailassigned_to2=1&amp;emailreporter2=1&amp;emailqa_contact2=1&amp;emailtype2=exact&amp;email2=&amp;bugidtype=include&amp;bug_id=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;cmdtype=doit&amp;order=Reuse+same+sort+as+last+time&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=">list
of known bugs</a>. 
</p>
<p>However, I’d like to highlight a particular issue: Support for
comments ending with <code>--!&gt;</code> is in the spec, but the
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=501106">patch
hasn’t landed, yet</a>. Support for similar endings of
pseudo-comment escapes within <code>script</code> element content is
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7089">not in
the spec yet</a>. The practical effect is that the rest of the page
may end up being swallowed up inside a comment or a <code>script</code>
element.</p>
<p>Another issue is that the new parser doesn’t yet inhibit
<code>document.write()</code> in places where it shouldn’t be
allowed per spec but where the old parser allowed it.</p>
<h2>Is There Anything New?</h2>
<p>So what’s fun if success is that you notice no change? There are
important technical things under the hood—like TCP packet
boundaries not affecting the parse result and there never being
unnotified nodes in the tree when the event loop spins—but you
aren’t supposed to notice.</p>
<p>However, there is a major new visible feature, too. With the HTML5
parser, you can use SVG and MathML in <code>text/html</code> pages.
This means that you can:</p>
<ul>
	<li><p><a href="http://hsivonen.iki.fi/test/svg-and-mathml-in-html.html">Use
	SVG graphics inline</a> without having to change your HTML content
	to work with XML parsing and without having to develop an
	alternative page for IE. 
	</p>
	</li><li><p><a href="http://hsivonen.iki.fi/test/moz/html5-parsing.html">Use
	properly laid out math</a> without having to change your HTML
	content to work with XML parsing.</p>
	</li><li><p><a href="http://hsivonen.iki.fi/test/moz/html5-parsing.html">Use
	SVG effects without external files.</a></p>
</li></ul>
<p>And yes, you can even put SVG inside MathML <code>&lt;annotation-xml&gt;</code>
or MathML inside <code>&lt;foreignObject&gt;</code>. The <a href="http://golem.ph.utexas.edu/~distler/blog/archives/001475.html">mixing
you’ve seen in XML</a> is now supported in HTML, too.</p>
<p>If you aren’t concerned with taking the steps to make things
degrade nicely in browsers that don’t support SVG and MathML in
HTML, you can simply copy and paste XML output from your favorite SVG
or MathML editor into your HTML source as long as the editor doesn’t
use namespace prefixes for elements and uses the prefix <code>xlink</code>
for XLink attributes. 
</p>
<p>If you don’t use the XML empty element syntax and you put you
SVG text nodes in CDATA sections, the page will degrade gracefully in
older HTML browser so that the image simply disappears but the rest
of the page is intact. You can even put a fallback bitmap as <code>&lt;img&gt;</code>
inside <code>&lt;desc&gt;</code>. Unfortunately, there isn’t a
similar technique for MathML, though if you want to develop one, I
suggest experimenting with the <code>&lt;annotation&gt;</code> as
your <code>&lt;desc&gt;</code>-like container.</p>
<p>There are known issues with matching camelCase names with
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=499655">Selectors</a>
or <code><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=499656">getElementByTagName</a></code>,
though.</p></div>
    </content>
    <updated>2009-07-08T12:54:16Z</updated>
    <published>2009-07-08T12:45:44Z</published>
    <category scheme="http://blog.whatwg.org" term="Browsers"/>
    <category scheme="http://blog.whatwg.org" term="Processing Model"/>
    <category scheme="http://blog.whatwg.org" term="Syntax"/>
    <author>
      <name>Henri Sivonen</name>
      <email>hsivonen@iki.fi</email>
      <uri>http://hsivonen.iki.fi/</uri>
    </author>
    <source>
      <id>http://blog.whatwg.org/feed/atom</id>
      <link href="http://blog.whatwg.org/feed" rel="self" type="application/atom+xml"/>
      <link href="http://blog.whatwg.org" rel="alternate" type="text/html"/>
      <rights xml:lang="en">Copyright 2009</rights>
      <subtitle xml:lang="en">Please leave your sense of logic at the door, thanks!</subtitle>
      <title xml:lang="en">The WHATWG Blog</title>
      <updated>2009-07-08T12:54:16Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <author>
      <name>Henri Sivonen</name>
    </author>
    <id>http://hsivonen.iki.fi/test-html5-parsing/</id>
    <link href="http://hsivonen.iki.fi/test-html5-parsing/" rel="alternate" type="text/html"/>
    <title type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml">Help Test HTML5 Parsing in Gecko</div>
    </title>
    <summary type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml">The HTML5 parsing algorithm is meant to demystify HTML parsing and
make it uniform across implementations in a backwards-compatible way.
The algorithm has had “in the lab” testing, but so far it hasn’t
been tested inside a browser by a large number of people. <em>You</em>
can help change that now!</div>
    </summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>The HTML5 parsing algorithm is meant to demystify HTML parsing and
make it uniform across implementations in a backwards-compatible way.
The algorithm has had “in the lab” testing, but so far it hasn’t
been tested inside a browser by a large number of people. <em>You</em>
can help change that now!</p>
<p>A while ago, an implementation of the HTML5 parsing algorithm
landed on <a href="http://hg.mozilla.org/mozilla-central/" shape="rect">mozilla-central</a>
preffed off. Anyone who is testing Firefox nightly builds can now opt
to turn on the HTML5 parser and test it.</p>
<h2>How to Participate?</h2>
<p>First, this isn’t release-quality software. Testing the HTML5
parser carries all the same risks as testing a nightly build in
general, and then some. It may crash, it may corrupt your Firefox
profile, etc. If you aren’t comfortable with taking the risks
associated with running nighly builds, you shouldn’t participate.</p>
<p>If you are still comfortable with testing, download a trunk
<a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/" shape="rect">nightly
build</a>, run it, navigate to <code>about:config</code> and flip the
preference named <code>html5.enable</code> to <code>true</code>. This
makes Gecko use the HTML5 parser when loading pages into the content
area and when setting <code>innerHTML</code>. The HTML5 parser is not
used for HTML embedded in feeds, Netscape bookmark import, View
Source, etc., yet.</p>
<p>The <code>html5.enable</code> preference doesn’t require a
restart to take effect. It takes effect the next time you load a
page.</p>
<h2>What to Test?</h2>
<p>The main thing is getting the HTML5 parser exposed to a wide range
of real Web content that people browse. This may turn up crashes or
compatibility problems. 
</p>
<p>So the way to help is to use nightly builds with the HTML5 parser
for browsing as usual. If you see no difference, things are going
well! If you see a page misbehaving—or, worse, crashing—with the
HTML5 parser turned on but not with it turned off, please report the
problem.</p>
<h2>Reporting Bugs</h2>
<p>Please file bugs in <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&amp;component=HTML:+Parser&amp;short_desc=%5BHTML5%5D+" shape="rect">the
“Core” product under “HTML: Parser” component with “[HTML5]
” at the start of the summary</a>.</p>
<h2>Known Problems</h2>
<p>First and foremost, please refer to the <a href="https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&amp;short_desc_type=substring&amp;short_desc=%5BHTML5%5D+&amp;classification=Components&amp;product=Core&amp;component=HTML:+Parser&amp;long_desc_type=substring&amp;long_desc=&amp;bug_file_loc_type=allwordssubstr&amp;bug_file_loc=&amp;status_whiteboard_type=allwordssubstr&amp;status_whiteboard=&amp;keywords_type=allwords&amp;keywords=&amp;resolution=DUPLICATE&amp;resolution=---&amp;emailassigned_to1=1&amp;emailtype1=exact&amp;email1=&amp;emailassigned_to2=1&amp;emailreporter2=1&amp;emailqa_contact2=1&amp;emailtype2=exact&amp;email2=&amp;bugidtype=include&amp;bug_id=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;cmdtype=doit&amp;order=Reuse+same+sort+as+last+time&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=" shape="rect">list
of known bugs</a>. 
</p>
<p>However, I’d like to highlight a particular issue: Support for
comments ending with <code>--!&gt;</code> is in the spec, but the
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=501106" shape="rect">patch
hasn’t landed, yet</a>. Support for similar endings of
pseudo-comment escapes within <code>script</code> element content is
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7089" shape="rect">not in
the spec yet</a>. The practical effect is that the rest of the page
may end up being swallowed up inside a comment or a <code>script</code>
element.</p>
<p>Another issue is that the new parser doesn’t yet inhibit
<code>document.write()</code> in places where it shouldn’t be
allowed per spec but where the old parser allowed it.</p>
<h2>Is There Anything New?</h2>
<p>So what’s fun if success is that you notice no change? There are
important technical things under the hood—like TCP packet
boundaries not affecting the parse result and there never being
unnotified nodes in the tree when the event loop spins—but you
aren’t supposed to notice.</p>
<p>However, there is a major new visible feature, too. With the HTML5
parser, you can use SVG and MathML in <code>text/html</code> pages.
This means that you can:</p>
<ul><li><p><a href="http://hsivonen.iki.fi/test/svg-and-mathml-in-html.html" shape="rect">Use
	SVG graphics inline</a> without having to change your HTML content
	to work with XML parsing and without having to develop an
	alternative page for IE. 
	</p>
	</li><li><p><a href="http://hsivonen.iki.fi/test/moz/html5-parsing.html" shape="rect">Use
	properly laid out math</a> without having to change your HTML
	content to work with XML parsing.</p>
	</li><li><p><a href="http://hsivonen.iki.fi/test/moz/html5-parsing.html" shape="rect">Use
	SVG effects without external files.</a></p>
</li></ul>
<p>And yes, you can even put SVG inside MathML <code>&lt;annotation-xml&gt;</code>
or MathML inside <code>&lt;foreignObject&gt;</code>. The <a href="http://golem.ph.utexas.edu/~distler/blog/archives/001475.html" shape="rect">mixing
you’ve seen in XML</a> is now supported in HTML, too.</p>
<p>If you aren’t concerned with taking the steps to make things
degrade nicely in browsers that don’t support SVG and MathML in
HTML, you can simply copy and paste XML output from your favorite SVG
or MathML editor into your HTML source as long as the editor doesn’t
use namespace prefixes for elements and uses the prefix <code>xlink</code>
for XLink attributes. 
</p>
<p>If you don’t use the XML empty element syntax and you put you
SVG text nodes in CDATA sections, the page will degrade gracefully in
older HTML browser so that the image simply disappears but the rest
of the page is intact. You can even put a fallback bitmap as <code>&lt;img&gt;</code>
inside <code>&lt;desc&gt;</code>. Unfortunately, there isn’t a
similar technique for MathML, though if you want to develop one, I
suggest experimenting with the <code>&lt;annotation&gt;</code> as
your <code>&lt;desc&gt;</code>-like container.</p>
<p>There are known issues with matching camelCase names with
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=499655" shape="rect">Selectors</a>
or <code><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=499656" shape="rect">getElementByTagName</a></code>,
though.</p></div>
    </content>
    <updated>2009-07-08T12:52:49Z</updated>
    <source>
      <id>http://hsivonen.iki.fi/feed/atom/</id>
      <author>
        <name>Henri Sivonen</name>
        <email>hsivonen@iki.fi</email>
      </author>
      <link href="http://hsivonen.iki.fi/" rel="alternate" type="text/html"/>
      <link href="http://hsivonen.iki.fi/feed/atom/" rel="self" type="application/atom+xml"/>
      <rights xml:lang="en">Copyright Henri Sivonen</rights>
      <subtitle xml:lang="en">Articles and blogish notes</subtitle>
      <title xml:lang="en">Henri Sivonen’s pages</title>
      <updated>2009-07-11T02:00:29Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://ajaxian.com/?p=7076</id>
    <link href="http://feedproxy.google.com/~r/ajaxian/~3/LM8eVZiGK7I/html-5-parser-lands-in-gecko" rel="alternate" type="text/html"/>
    <title>HTML 5 Parser Lands in Gecko</title>
    <summary>John Resig has blogged about HTML 5 parsing and the news that Henri Sivonen (the chap who did the HTML 5 validator) has landed a massive commit to the trunk of Firefox that includes an HTML 5 parser.
The method is quite interesting:

What's interesting about this particular implementation is that it's actually an automated conversion of [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>John Resig <a href="http://ejohn.org/blog/html-5-parsing/">has blogged about HTML 5 parsing</a> and the news that Henri Sivonen (the chap who did the <a href="http://html5.validator.nu/">HTML 5 validator</a>) has landed a <a href="http://hg.mozilla.org/mozilla-central/rev/8b5103cb12a6">massive commit</a> to the trunk of Firefox that includes an HTML 5 parser.</p>
<p>The method is quite interesting:</p>
<blockquote>
<p>What's interesting about this particular implementation is that it's actually an automated conversion of Henri's Java HTML 5 parser to C++. This conversion happens automatically and changes will be pushed upstream to the Mozilla codebase.</p>
<p>Normally I would balk at the mention of a wholesale, programmatic, conversion of a Java codebase over to C++ but <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=487949#c33">the results</a> have been very surprising: <strong>A 3% boost in pageload performance.</strong></p>
<p>And this is on top of the litany of bug fixes and compliance checks that this code base will be providing. You can examine some of the progress that went into the constructing the patch in the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=487949">Mozilla bug</a>.</p>
<p>If you're interested in giving the new parser a try (it's doubtful that you'll see many obvious changes - but any help in hunting down bugs would be appreciated) you can download a <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/">nightly of Firefox</a>, open about:config, and set <code>html5.enable</code> to true.</p>
</blockquote>
<p>For extra fun, throw in some inline SVG and see it just work! Bye bye namespaces!</p>
<p><b>Pithy HTML5/XHTML comments</b></p>
<p><a href="http://twitter.com/morilldl">Dan Morill</a> (Android and formerly GWT fame and al-round good guy) had some funny remarks on the XHTML/HTML5 kerfuffle:</p>
<blockquote><p>
An exercise:  I can easily summarize HTML5 in a single Tweet.  I can't think of a way to do that for XHTML. "HTML5 codifies existing behaviors and is a practitioner's roadmap for the future of browser capabilities."</p>
<p>This "death of XHTML" meme is awesome, it's soooo easy to bust out with pithy zingers.</p>
<p>Here's one: "The web *itself* is content soup, why should we expect HTML to be more than tag soup?"</p>
<p>Another: "XHTML was the Edsel of the web: painstakingly designed, proudly touted, and utterly missing the point."</p>
<p>"They finally closed the tag on XHTML, and now the web is validated."
</p></blockquote>
</div>
    </content>
    <updated>2009-07-08T11:27:02Z</updated>
    <category term="Front Page"/>
    <category term="HTML"/><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://ajaxian.com/archives/html-5-parser-lands-in-gecko</feedburner:origlink>
    <author>
      <name>Dion Almaer</name>
    </author>
    <source>
      <id>http://ajaxian.com</id>
      <link href="http://ajaxian.com" rel="alternate" type="text/html"/>
      <link href="http://ajaxian.com/index.xml" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com" rel="hub" type="text/html"/>
      <subtitle>Cleaning up the web with Ajax</subtitle>
      <title>Ajaxian » Front Page</title>
      <updated>2009-07-10T11:18:53Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://hacks.mozilla.org/?p=1313</id>
    <link href="http://hacks.mozilla.org/2009/07/video-more-than-just-a-tag/" rel="alternate" type="text/html"/>
    <title xml:lang="en">video - more than just a tag</title>
    <summary xml:lang="en">This article is written by Paul Rouget, Mozilla contributor and purveyor of extraordinary Open Web demos.
Starting with Firefox 3.5, you can embed a video in a web page like an image. This means video is now a part of the document, and finally, a first class citizen of the Open Web. Like all other elements, [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p><em>This article is written by <a href="http://blog.mozbox.org/">Paul Rouget</a>, Mozilla contributor and purveyor of <a href="http://people.mozilla.com/~prouget/demos/">extraordinary Open Web demos</a>.</em></p>
<p>Starting with Firefox 3.5, you can embed a video in a web page like an image. This means video is now <em>a part</em> of the document, and finally, a first class citizen of the Open Web. Like all other elements, you can use it with CSS and JavaScript. Let’s see what this all means … </p>
<p><strong>The Basics</strong></p>
<p>First, you need a video to play. Firefox supports the Theora codec (<a href="https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements">see here to know all media formats supported by the audio and video elements</a>).</p>
<p>Add the video to your document:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family: monospace;"><span style="color: #009900;">&lt;video <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myVideo"</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myFile.ogv"</span><span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>You might need to add some “fallback” code if the browser doesn’t support the video tag.  Just include some HTML (which could be a warning, or even some Flash) inside the video tag.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family: monospace;"><span style="color: #009900;">&lt;video <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myVideo"</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myFile.ogv"</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Your browser is not awesome enough!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>video&gt;</span></pre></div></div>

<p>Here’s some more information <a href="http://hacks.mozilla.org/2009/06/html5-video-fallbacks-markup/">about the fallback mechanism</a>.</p>
<p><strong>HTML Attributes</strong></p>
<p>You can find <a href="https://developer.mozilla.org/En/HTML/Element/Video">all the available attributes here</a>. </p>
<p>Some important attributes:</p>
<ul>
<li>autoplay: The video will be played just after the page loads.</li>
<li>autobuffer: By default (without this attribute), the video file is not downloaded unless you click on the play button. Adding this attribute starts downloading the video just after the page loads.</li>
<li>controls: by default (without this attribute), the video doesn’t include any controls (play/pause button, volume, etc.). Use this attribute if you want the default controls.</li>
<li>height/width: The size of the video</li>
</ul>
<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family: monospace;"><span style="color: #009900;">&lt;video <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myVideo"</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myFile.ogv"</span> </span>
<span style="color: #009900;">   autobuffer<span style="color: #66cc66;">=</span><span style="color: #ff0000;">"true"</span> controls<span style="color: #66cc66;">=</span><span style="color: #ff0000;">"true"</span><span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>You don’t have to add the “true” value to some of these attributes in HTML5, but it’s neater to do so. If you’re not in an XML document, you can simply write:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family: monospace;"><span style="color: #009900;">&lt;video <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myVideo"</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myFile.ogv"</span> autobuffer controls<span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p><strong>JavaScript API</strong></p>
<p>Like any other HTML element, you have access to the video element via the Document Object Model (DOM):</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;"><span style="color: #003366; font-weight: bold;">var</span> myVideo <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"myVideo"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></pre></div></div>

<p>Once you obtain a handle to the video element, you can use the JavaScript API for video.</p>
<p>Here is a short list of some useful methods and properties (and see here <a href="https://developer.mozilla.org/en/nsIDOMHTMLMediaElement">for more of the DOM API</a> for audio and video elements):</p>
<ul>
<li>play() / pause(): Play and pause your video.</li>
<li>currentTime: The current playback time, in seconds. You can change this to seek.</li>
<li>duration: The duration of the video.</li>
<li>muted: Is the sound muted?</li>
<li>ended: Has the video ended?</li>
<li>paused: Is the video paused?</li>
<li>volume: To determine the volume, and to change it.</li>
</ul>
<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family: monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">button</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myVideo.play()"</span>&gt;</span>Play<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">button</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">button</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myVideo.volume = 0.5"</span>&gt;</span>Set Volume<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">button</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">button</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"alert(myVideo.volume)"</span>&gt;</span>Volume?<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">button</span>&gt;</span></pre></div></div>

<p><strong>Events</strong></p>
<p>You know how to control a video (play/pause, seek, change the volume, etc.). You have almost everything you need to create your own controls. But you need some feedback from the video, and for that, let’s see the different events you can listen to:</p>
<ul>
<li>canplay: The video is ready to play</li>
<li>canplaythrough: The video is ready to play without interruption (if the download rate doesn’t change)</li>
<li>load: The video is ready to play without interruption (the video has been downloaded entirely)</li>
<li>ended: The video just ended</li>
<li>play: The video just started playing</li>
<li>pause: The video has been paused</li>
<li>seeking: The video is seeking (it can take some seconds)</li>
<li>seeked: The seeking process just finished</li>
<li>timeupdate: While the video is playing, the currentTime is updated. Every time the currentTime is updated, timeupdate is fired. </li>
</ul>
<p>Here’s <a href="https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox">a full list of events</a>.</p>
<p>For example, you can follow the percentage of the video that has just been played:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;"><span style="color: #003366; font-weight: bold;">function</span> init<span style="color: #009900;">(</span><span style="color: #009900;">)</span> 
<span style="color: #009900;">{</span>
  <span style="color: #003366; font-weight: bold;">var</span> video <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"myVideo"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> textbox <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"sometext"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
  video.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"timeupdate"</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
  textbox.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> Math.<span style="color: #660066;">round</span><span style="color: #009900;">(</span><span style="color: #CC0000;">100</span> <span style="color: #339933;">*</span> <span style="color: #009900;">(</span>video.<span style="color: #660066;">currentTime</span> <span style="color: #339933;">/</span> video.<span style="color: #660066;">duration</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">"%"</span><span style="color: #339933;">;</span> <span style="color: #009900;">}</span>
 
<span style="color: #009900;">}</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family: monospace;"><span style="color: #009900;">&lt;video <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myVideo"</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myFile.ogv"</span> </span>
<span style="color: #009900;">            autoplay<span style="color: #66cc66;">=</span><span style="color: #ff0000;">"true"</span> onplay<span style="color: #66cc66;">=</span><span style="color: #ff0000;">"init()"</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"sometext"</span><span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>Showing all this in action, <a href="http://www.tapper-ware.net/devel/js/JS.TinyVidPlayer/index.xhtml">here’s a nice open video player using the Video API</a>.</p>
<p>Now that you’re familiar with some of the broad concepts behind the Video API, let’s really delve into the video as a part of the Open Web, introducing video to CSS, SVG, and Canvas.</p>
<p><strong>CSS and SVG</strong></p>
<p>A video element is an HTML element. That means you can use CSS to style it.</p>
<p>A simple example: using the CSS Image Border rule (a new CSS 3 feature introduced in Firefox 3.5). <a href="https://developer.mozilla.org/En/HTML/Canvas/Pixel_manipulation_with_canvas">You can view how it works on the Mozilla Developer Wiki</a>.</p>
<p>And obviously, you can use it with the video tag:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family: monospace;"> 
<span style="color: #009900;">&lt;video <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myVideo"</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myFile.ogv"</span> </span>
<span style="color: #009900;"><span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"-moz-border-image: </span>
<span style="color: #009900;">           url(tv-border.jpg) 25 31 37 31 stretch stretch; </span>
<span style="color: #009900;">           border-width: 20px;"</span><span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>One of my demos <a href="http://people.mozilla.com/~prouget/demos/srt/index.xhtml">uses this very trick</a>.</p>
<p>Since Firefox 3.5 provides some new snazzy new CSS features, you can do some really fantastic things. Take a look at the <a href="http://hacks.mozilla.org/2009/06/tristan-washing-machine/">infamous washing machine demo</a>, in which I subject an esteemed colleague to some rotation.  </p>
<p>It uses some CSS rules:</p>
<ul>
<li><a href="https://developer.mozilla.org/En/Applying_SVG_effects_to_HTML_content">filter, clip-path.</a></li>
<li><a href="https://developer.mozilla.org/En/CSS/Using_CSS_transforms">css transform.</a></li>
</ul>
<p>And some SVG:</p>
<ul>
<li><a href="http://www.w3.org/TR/SVG11/extend.html#ForeignObjectElement">SVG &amp; foreignobject.</a></li>
</ul>
<p>Because the video element is like any other HTML element, you can add some HTML content over the video itself, <a href="http://people.mozilla.com/~prouget/demos/srt/index2.xhtml">like I do in this demo</a>. As you can see, there is a <code>&lt;div&gt;</code> element on top of the video (<code>position: absolute;</code>).</p>
<p><strong>Time for a Break</strong></p>
<p>Well, we’ve just seen how far we can go with the video element, both how to control it and how to style it. That’s great, and it’s powerful. I strongly encourage you to read about <a href="https://developer.mozilla.org/en/Firefox_3.5_for_developers">the new web features available in Firefox 3.5</a>, and to think about what you can do with such features and the video element.</p>
<p>You can do <em>so much</em> with the power of the Open Web. You can compute the pixels of the video. You can, for example, try to find some shapes in the video, follow the shapes, and draw something as an attachment to these shapes. That’s <a href="http://people.mozilla.com/~prouget/demos/DynamicContentInjection/play.xhtml">what I do here!</a> Let’s see how it actually works.</p>
<p><strong>Canvas &amp; Video</strong></p>
<p>Another HTML 5 element is <code>canvas</code>. With this element, you can draw bitmap data (see the <a href="https://developer.mozilla.org/En/HTML/Canvas"><code>canvas</code> reference</a>, and I strongly suggest t<a href="http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html">his canvas overview</a>). But something you might not know is that you can copy the content of an <code>&lt;img/&gt;</code> element, a <code>&lt;canvas/&gt;</code> element and a <code>&lt;video/&gt;</code> element.</p>
<p>That’s a really important point for the <code>video</code> element. It gives you a way to play with the values of the pixels of the video frames.</p>
<p>You can do a “screenshot” of the current frame of the video in a canvas.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family: monospace;"><span style="color: #003366; font-weight: bold;">function</span> screenshot<span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
 <span style="color: #003366; font-weight: bold;">var</span> video <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"myVideo"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> canvas <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"myCanvas"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> ctx <span style="color: #339933;">=</span> canvas.<span style="color: #660066;">getContext</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"2d"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
 
 ctx.<span style="color: #660066;">drawImage</span><span style="color: #009900;">(</span>video<span style="color: #339933;">,</span> 0<span style="color: #339933;">,</span> 0<span style="color: #339933;">,</span> canvas.<span style="color: #660066;">width</span><span style="color: #339933;">,</span> canvas.<span style="color: #660066;">height</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family: monospace;"><span style="color: #009900;">&lt;video <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myVideo"</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myFile.ogv"</span> autoplay<span style="color: #66cc66;">=</span><span style="color: #ff0000;">"true"</span> with<span style="color: #66cc66;">=</span><span style="color: #ff0000;">"600"</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"400"</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;canvas <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"myCanvas"</span> with<span style="color: #66cc66;">=</span><span style="color: #ff0000;">"600"</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"400"</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">button</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"screenshot()"</span>&gt;</span>Copy current frame to canvas<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">button</span>&gt;</span></pre></div></div>

<p>You can first apply a transformation to your canvas (<a href="https://developer.mozilla.org/en/Canvas_tutorial/Transformations">see the documentation</a>). You can also <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage">copy a thumbnail of the video</a>.</p>
<p>If you draw every frame in a canvas, your canvas will look like a video element. And you can draw what you want in this canvas, after drawing the frame. That’s <a href="http://people.mozilla.com/~prouget/demos/DynamicContentInjection/play.xhtml">what I do in this demo</a>.</p>
<p>Once you have a video frame in your canvas, <a href="https://developer.mozilla.org/En/HTML/Canvas/Pixel_manipulation_with_canvas">you can compute the values of the pixels</a>.</p>
<p>Some things you should know if you want to compute the pixels values of a frame:</p>
<ul>
<li>you can’t use this mechanism with a video from another domain.</li>
<li>you can’t use this mechanism with a video from a file:/// URL (which would be useful during the development of your web application). But you can change this behavior for testing: in about:config, change the value of “security.fileuri.strict_origin_policy” to “false”.  But <em>be very careful!</em> editing about:config — that’s an expert feature!</li>
<li>There are two ways to display the result of your application on the top of the video:
<ul>
<li>use your canvas as a video (if you draw the frame every time), and then draw directly into the canvas</li>
<li>use a transparent canvas on the top of the video</li>
</ul>
</li>
<li>the canvas element can be “display: none”</li>
<li> the video element can be “display: none” </li>
</ul>
<p><strong>About JavaScript</strong></p>
<p>For the image processing, you will need to do a lot of computation.  Here are some tricks:</p>
<ul>
<li>copy your frame in a small canvas. If the canvas is three times smaller than the video, it means nine times fewer pixels to compute.</li>
<li>avoid recursion. In a recursion, the script engine doesn’t <a href="https://wiki.mozilla.org/JavaScript:TraceMonkey">use the JIT optimization.</a>
</li>
<li>if you want to do a distance between colors, use the <a href="http://en.wikipedia.org/wiki/Lab_color_space">L.A.B colorspace.</a></li>
<li>if you want to find the center of an object, <a href="http://en.wikipedia.org/wiki/Centroid">compute its centroid</a>. See the “computeFrame” function <a href="http://people.mozilla.com/~prouget/demos/DynamicContentInjection/main.js">that I use in this JavaScript snippet</a> for my demo.</li>
<li>if the algorithm is really heavy, you can use a <a href="https://developer.mozilla.org/En/DOM/Worker">Worker thread</a>, but take into account that you will need to send the content of the canvas to the thread. It’s a big array, and objects are automatically JSONified before being sent. It can take a while. </li>
</ul>
<p><strong>Conclusion</strong></p>
<p>As you can see, you can do powerful things with the video element, the canvas element, CSS3, SVG and the new JavaScript engine. You have everything in your hands to create a completely new way to use Video on the web.  It’s up to you now — upgrade the web!</p>
<p><strong>References</strong></p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Lab_color_space">LAB Color Space - for color space distances.</a></li>
<li><a href="https://developer.mozilla.org/En/DOM/Worker">How to use threads in your JavaScript code.</a></li>
<li><a href="http://en.wikipedia.org/wiki/Centroid">The centroid definition - good way to compute the center of an object from its pixels.</a></li>
<li><a href="https://wiki.mozilla.org/JavaScript:TraceMonkey">TraceMonkey - the new Firefox JavaScript engine</a></li>
<li><a href="https://developer.mozilla.org/En/HTML/Canvas/Pixel_manipulation_with_canvas"> Pixel manipulation with canvas.</a></li>
<li><a href="http://people.mozilla.com/~prouget/demos/DynamicContentInjection/play.xhtml">The “Dynamic Content Injection” demo.</a></li>
<li><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage">The canvas.drawImage API - useful to inject the frame of a video into a canvas element.</a></li>
<li><a href="https://developer.mozilla.org/en/Canvas_tutorial/Transformations">How to do transformation in your canvas.</a></li>
<li><a href="http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html">A good overview of the canvas API.</a></li>
<li><a href="https://developer.mozilla.org/En/HTML/Canvas">Everything you need to know about canvas.</a></li>
<li><a href="https://developer.mozilla.org/en/Firefox_3.5_for_developers">All the new OpenWeb features in Firefox 3.5.</a></li>
<li><a href="http://people.mozilla.com/~prouget/demos/srt/index2.xhtml">Layering a div over a video.</a></li>
<li><a href="https://developer.mozilla.org/En/CSS/Using_CSS_transforms">Transformation with CSS 3.</a></li>
<li><a href="http://www.w3.org/TR/SVG11/extend.html#ForeignObjectElement">Including HTML inside SVG.</a></li>
<li><a href="https://developer.mozilla.org/En/Applying_SVG_effects_to_HTML_content"> Applying SVG effects to HTML content.</a></li>
<li><a href="http://www.tapper-ware.net/devel/js/JS.TinyVidPlayer/index.xhtml">A 100% OpenVideo player.</a></li>
<li><a href="https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox">The reference for the video and the audio HTML5 tags.</a></li>
<li><a href="https://developer.mozilla.org/en/nsIDOMHTMLMediaElement">The Javascript API for the video and the audio tags.</a></li>
<li><a href="https://developer.mozilla.org/En/HTML/Element/Video">The video HTML attributes.</a></li>
<li><a href="http://hacks.mozilla.org/2009/06/html5-video-fallbacks/">The video fallback mechanism.</a></li>
<li><a href="https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements"> Media formats supported by the audio and video elements. </a></li>
<li><a href="http://people.mozilla.com/~prouget/demos/">My demos.</a></li>
</ul></div>
    </content>
    <updated>2009-07-08T03:04:54Z</updated>
    <category term="35 Days"/>
    <category term="Feature"/>
    <category term="Firefox 3.5"/>
    <category term="Standards"/>
    <category term="Video"/>
    <author>
      <name>Arun Ranganathan</name>
    </author>
    <source>
      <id>http://hacks.mozilla.org</id>
      <link href="http://hacks.mozilla.org/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://hacks.mozilla.org" rel="alternate" type="text/html"/>
      <title xml:lang="en">hacks.mozilla.org</title>
      <updated>2009-07-09T10:33:37Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://ejohn.org/blog/html-5-parsing/</id>
    <link href="http://ejohn.org/blog/html-5-parsing/" rel="alternate" type="text/html"/>
    <title xml:lang="en">HTML 5 Parsing</title>
    <summary xml:lang="en">One of the biggest wins of the HTML 5 recommendation is a detailed specification outlining how parsing of HTML documents should work. For too many years browsers have simply tried to guess and copy what others were doing in hopes that their parser would work well enough to not cause too many problems with HTML [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p><img src="http://ejohn.org/files/whatwg.png" style="margin: 0 0 10px 10px; float: right;"/></p>
	<p>One of the biggest wins of the HTML 5 recommendation is a <a href="http://dev.w3.org/html5/spec/Overview.html#parsing">detailed specification</a> outlining how parsing of HTML documents should work. For too many years browsers have simply tried to guess and copy what others were doing in hopes that their parser would work well enough to not cause too many problems with HTML markup found in the wild.</p>
	<p>While some parts of HTML 5 are certainly more contentious than others - the parsing section is one that is almost universally appreciated by browser vendors. Once browsers start to implement it users will enjoy the improved compatibility, as well.</p>
	<p>One of the first implementations of the HTML 5 parsing rules was actually created to power the <a href="http://html5.validator.nu/">HTML 5 validator</a>. (If you're interested in testing it out, <a href="http://ejohn.org/">http://ejohn.org/</a> should validate as HTML 5.) This particular implementation is <a href="http://about.validator.nu/htmlparser/">in Java</a>, provides SAX and DOM interfaces for use, and is <a href="http://svn.versiondude.net/whattf/htmlparser/trunk/">open source</a>.</p>
	<p>This is particularly interesting because Henri Sivonen (the author of the validator) just recently <a href="http://hg.mozilla.org/mozilla-central/rev/8b5103cb12a6">landed</a> (<strong>Warning:</strong> Massive web page) a brand new HTML 5 parsing engine in Gecko, destined for the next version of Firefox.</p>
	<p>What's interesting about this particular implementation is that it's actually an automated conversion of Henri's Java HTML 5 parser to C++. This conversion happens automatically and changes will be pushed upstream to the Mozilla codebase.</p>
	<p>Normally I would balk at the mention of a wholesale, programmatic, conversion of a Java codebase over to C++ but <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=487949#c33">the results</a> have been very surprising: <strong>A 3% boost in pageload performance.</strong></p>
	<p>And this is on top of the litany of bug fixes and compliance checks that this code base will be providing. You can examine some of the progress that went into the constructing the patch in the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=487949">Mozilla bug</a>.</p>
	<p>If you're interested in giving the new parser a try (it's doubtful that you'll see many obvious changes - but any help in hunting down bugs would be appreciated) you can download a <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/">nightly of Firefox</a>, open about:config, and set <code>html5.enable</code> to true.</p>
	<p>If there was ever a time to start playing around with the jump to HTML 5, now would be it. Since HTML 5 is a superset of the features provided by HTML 4 and XHTML 1 it ends up being surprisingly easy to 'upgrade': Just start by swapping out your current (X)HTML Doctype for the <a href="http://ejohn.org/blog/html5-doctype/">HTML 5 Doctype</a>:</p>
	<pre>&lt;!DOCTYPE html&gt;</pre>
	<p>From there you can check the site <a href="http://html5doctor.com/">HTML 5 Doctor</a> for additional details on how to get the new <a href="http://html5doctor.com/how-to-get-html5-working-in-ie-and-firefox-2/">HTML 5 elements working</a> in all browsers.
</p>
		<img src="http://ejohn.org/apps/rss/?from=rss&amp;id=5689" style="width: 0px; height: 0px;"/></div>
    </content>
    <updated>2009-07-07T22:00:29Z</updated>
    <category term="mozilla"/>
    <category term="firefox"/>
    <category term="html5"/>
    <author>
      <name>John Resig</name>
    </author>
    <source>
      <id>http://ejohn.org</id>
      <link href="http://ejohn.org" rel="alternate" type="text/html"/>
      <link href="http://ejohn.org/mozilla/feed/" rel="self" type="application/rss+xml"/>
      <subtitle xml:lang="en">Blog, Projects, and Links</subtitle>
      <title xml:lang="en">John Resig</title>
      <updated>2009-07-09T19:37:47Z</updated>
    </source>
  </entry>

  <entry>
    <author>
      <name>Reddit: Browsers</name>
    </author>
    <id>http://www.reddit.com/r/browsers/comments/8z38a/ogg_theora_h264_and_the_html_5_browser_squabble/</id>
    <link href="http://www.reddit.com/r/browsers/comments/8z38a/ogg_theora_h264_and_the_html_5_browser_squabble/" rel="alternate" type="text/html"/>
    <title>Ogg Theora, H.264 and the HTML 5 Browser Squabble</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">submitted by <a href="http://www.reddit.com/user/awoo"> awoo </a> <br/> <a href="http://www.appleinsider.com/articles/09/07/06/ogg_theora_h_264_and_the_html_5_browser_squabble.html">[link]</a> <a href="http://www.reddit.com/r/browsers/comments/8z38a/ogg_theora_h264_and_the_html_5_browser_squabble/">[comment]</a></div>
    </summary>
    <updated>2009-07-07T21:30:45Z</updated>
    <source>
      <id>http://www.reddit.com/r/browsers/</id>
      <logo>http://thumbs.reddit.com/t5_2qh5r.png?v=ac2222c5990eb474100fb8ad5a34015c</logo>
      <author>
        <name>Reddit: Browsers</name>
      </author>
      <link href="http://www.reddit.com/r/browsers/" rel="alternate" type="text/html"/>
      <link href="http://reddit.com/r/browsers/.rss" rel="self" type="application/rss+xml"/>
      <subtitle>A reddit for posting news about browsers, browser technology and web standards. Anyone can post.</subtitle>
      <title>Browsers &amp; Browser technology</title>
      <updated>2009-07-07T21:34:22Z</updated>
    </source>
  </entry>
</feed>
