What are we facing?
Internet Explorer 8’s Webslices are becoming popular in media. The magic relays on the fact that they seem to be an evolution of RSS and it is based on hAtom microformat. Given the potential big acceptance of webslices, is there any other browser beyond Internet Explorer implementing Webslices? Is there some help for constructing Webslices?
The Solution
Firefox 3 now has an extension for supporting Webslices by means of an Add-on called WebChunks. The nice thing about WebChuncks is that it works on pages originally intended for IE8 WebSlices, for instance ebay and StumbleUpon. We are yet to see this kind of support in other browsers, and to see if Firefox is going to support it natively, but there good precedents for it.
On the other hand, how do you a Webslice?
Let’s say you identify that the next piece of code is going to be of the interest of the user to get updates of its changes:
<div class="myClass">
<p class="content" id="title">
Content
</p>
</div>
Using Aggiorno, you can get the following code in the Webslice format:
<div class="hslice myClass" id="myID">
<span class="entry-title" style="display: none">Web Slice to display</span>
<span class="entry-content">
<p class="content" id="title">
Content
</p>
</span>
</div>
Voila! You get a simple webslice! You are done by adding
- a unique id for the block element
- the “hslice” class for telling the browser that this block element is a Webslice
- a block element with “entry-title” class and the title inside
- a wrapper block element for the content
There are more attribures to make it more powerful, take a look at the IE8 reference.
Some external references
[advertisement] Try
Aggiorno for free, the assistant tool for web development you always wanted.