// you’re reading...

Microsoft

Slice out my latest post

The second beta of the upcoming version  of Microsoft’s Internet Explorer (IE 8 ) web browser was released last month. One of the touted features of IE 8 is Web Slices.

Many of us cut out articles from the newspapers if we find them interesting. Think of Web Slices to be cuttings from Web sites. But with a difference. If these cuttings (web content) are updated on the respective web sites, you will be notified, as well as your cuttings will be updated. Technically, you “subscribe to a Web Slice”, instead of saying cutting it off which may offend the webmasters ;-)

The latest post on my Blog is Web Slice enabled (or say, it is a Web Slice). In fact, it is Web Slice enabled since some time. Perhaps, some of you (who are using IE 8 ) would have noticed it.

Other web sites which are Web Slice enabled are digg.com, ebay.com, facebook.com, msn.com etc.

How to subscribe to a Web Slice

To slice out the latest post or to subscribe to the latest post on my blog:

A green icon indicates Web Slice(s) on the page

A green icon indicates Web Slice(s) on the page

  • Clicking on the green icon, will show you a dialog box which prompts you to add the Web Slice. Clicking the Add button, on the dialog, will place a bookmark on the Favorites bar.
  • Alternatively, if you move your mouse over the latest post, you will see a green border around the latest post, and a green icon on the left, as shown below:
Move the mouse over the latest post to subscribe to the Web Slice

Move the mouse over the latest post to subscribe to the Web Slice

  • By clicking on the green icon you can subscribe to the Web Slice.
  • Clicking on this bookmark will show you the preview of the Web Slice (the content of my latest blog post), as shown in the screenshot below:
Web Slice Preview

Web Slice Preview

  • Clicking on the arrow (->) icon on the preview window will take you to the full blog post.

How does it work ?

If I write a new blog post which, upon publish, becomes my latest post, the Web Slice bookmark on your IE will turn bold. By default, the Web Slice is checked for any updates once in a day. Upon an update, the Web Slice bookmark can turn bold or even play a sound.

Right click on the Web Slice bookmark. Click on “Bold on Update”. This will make the bookmark bold, upon an update.

To play and sound, right click on the bookmark and select Properties. Click on the Settings button under “Update Schedule”. Check the box labeled “Play a sound when a monitored feed or Web Slice is updated.

Notice the numerous other options in the Properties window. Note that you can setup when to check the Web Slice for updates – which is by default set to 1 day.

How to enable Web Slice on your site

Refer to the URL http://msdn.microsoft.com/en-us/library/cc848871(VS.85).aspx. Read the section titled “Creating Web Slices”.

The rules are:

  1. The Web Slice Block: You should have a HTML tag (like a <DIV>) enclosing the content that you want to Web Slice enable. This <DIV> tag must have the CSS class name set to “hslice” and must have an id. If you view source (the HTML source) of this blog, you will notice: <div id=“latest_post” class=“hslice”> Note that this <div> has the class set to hslice and id set to latest_post. The id must be unique. That is, no other element or tag on the page must have the same id. If you search for latest_post in the source, you will not find any other element with the same id.
  2. The Web Slice Title: The title of the Web Slice or the content should be enclosed within a tag with the classname as entry-title. On my blog, I have given this class name to the anchor (<a>) tag which encloses the title of the latest blog post.
  3. The Web Slice Body/Content: The content should be enclosed within a tag whose classname is entry-content. Earlier the content of the latest post was enclosed within a paragraph tag (<p>). But giving the <p> tag, the class name as entry-title did not show the preview of the Web Slice (as shown in one of the screenshots above). Changing the <p> tag to a <span> tag showed the preview. Note that on my blog, the content of the latest post is either the full content (in some cases) or a part of the full content. In the latter case, clicking on continue reading shows you the full content. In the latter case, the Web Slice will be marked as updated only when I update the part of the content which shows in the latest post.

To summarize, following is the markup structure of my latest blog post which is Web Slice enabled:

<div id=”latest_post” class=”hslice”>


<a class=”entry-title”  href=”…”> the post title </a>


<span class=”entry-content”>
the post content
</span>


</div>

Issues with Web Slices

Though Web Slices seem to be easy to implement, I thought of the following issues with them:

  1. For an existing site it may not be always straight forward to implement Web Slices if there are issues like <p> not working (as explained in point 3 in the above section). I would like to have no structure change to use Web Slices.
  2. If you go through the link http://msdn.microsoft.com/en-us/library/cc848871(VS.85).aspx, you will notice a line which says “The Web Slice preview window will not always display content the exact same way it appears on a Web page; some of the formatting is stripped away”. I could not find the documentation on what formatting is stripped away. I can see that, the Web Slice preview magically removes the continue reading, comments and category links (which are at the bottom of the latest post). And it magically redirects to the full post, when clicking on the -> (arrow) on the preview button. How come, it is detecting the first link as a useful link and discarding other links. I like magic but would like to read the documented logic behind it.
  3. Web Slice only works with IE 8, officially (read “Web Slices with Firefox” below). Perhaps, RSS still remains the cross browser standard which works well to notify about updates.

Web Slices with Firefox

With Firefox 3 and a plugin called Webchunks, you can use Web Slices in Firefox! It is very similar to using it in IE. First install the plugin from the following link http://disruptive-innovations.com/zoo/webchunks/webchunks-0.30.xpi. This is the direct link to the plugin. So launch it in Firefox 3.Once installed, it will ask for a Firefox restart. After restart, if you navigate back to my blog (or any other Web Slice enabled) site, you can subscribe to the Web Slices in a very similar way as shown in the screenshots below:

Clicking on the blue icon (on the left) will allow you to subscribe to a Web Slice (if any) on the page

Clicking on the blue icon (on the left) will allow you to subscribe to a Web Slice (if any) on the page

You can also subscribe to a Web Slice by moving the mouse over the content

You can also subscribe to a Web Slice by moving the mouse over the content, as in IE 8

The Web Slice preview in Firefox 3

The Web Slice preview in Firefox 3

To sum up, I do like the visual slicing out (e.g. by moving the mouse over on the latest post) of content from the web pages. It is like I’m indeed cutting and taking off something from the website :-)

Update:

“And it magically redirects to the full post, when clicking on the -> (arrow) on the preview button. How come, it is detecting the first link as a useful link and discarding other links. I like magic but would like to read the documented logic behind it.”

Found the logic behind this one. It follows the link (<a>) which has rel=”bookmark”. My latest blog post has two links (the title link and the continue reading link) whose rel=”bookmark”. Both of them point to the full post. So Web Slices is picking up one of them, either the first one or the last one.

GD Star Rating
loading...
GD Star Rating
loading...
  • Share/Bookmark

Discussion

4 comments for “Slice out my latest post”

  1. Great, thanks for the overview.

    Off topic: The website that I manage ( http://www.dare.co.in ) is dominated by IE6 vistors, followed by IE7, who make up for more than half of the visitors trending.

    To be honest, it is sort of a pain to look and feel all nice and smooth to users of these different browsers :-S

    GD Star Rating
    loading...

    Posted by Binesh Kutty | September 17, 2008, 1:09 am
  2. these different browsers

    Different browsers ? You have mentioned only IE. Hmm, so IE and its different versions are different browsers for you ? ;-)

    Serious stuff follows:

    To be honest, it is sort of a pain to look and feel all nice and smooth to users of these different browsers

    I agree. the pain seems to be never ending.

    Was kinda happy to see, Google adopting Webkit instead of some homegrown GoogleWebKit. Can we assume that Safari and Chrome will render websites the same way ? Will changes contributed by Google to Webkit be acceptable to Apple and vice versa ? Pheww.

    Whatever may be the claim of each browser, each time, with every version, to be the most standard compliant, Bineshs and Shekhars keep suffering.

    The only way out is if the browsers do simply what they do the best – bookmarks, remember password, history etc. and leave the rendering to a engine developed by, say, W3C. The vision (only mine) is, all browsers use the same rendering engine. Will they (Microsoft, Mozilla, Chrome, Safari, Opera etc.) “dare” to do something like this ? Not to forget the mobile space where, yet again, you have Pocket IE, Minimo, Opera, Symbian web browser and what not. The day you have achieved the nirvana of looking good on desktop browsers, the next hour you hear that you don’t look good on someone’s mobile phone. To sum up – all the very best of LUCK – to you and me :-)

    GD Star Rating
    loading...

    Posted by Shekhar | September 17, 2008, 11:58 am
  3. Hi! Shekhar,

    Tried the webchunks FF3 plugin, works with ebay and stumbleupon but did not work with your site?

    Are you considering writing a Wordpress plugin for the easy creation of the slices? ;-)

    Cheers…Kishore

    GD Star Rating
    loading...

    Posted by Kishore Bhargava | September 18, 2008, 7:41 pm
  4. Are you considering writing a Wordpress plugin for the easy creation of the slices?

    not sure if a plugin can be written for it. web slices require change in the markup. hence a wordpress theme which is web slice enabled is a better bet :-)

    but do u like the concept of web slices ? how is it better, if at all, from RSS?

    GD Star Rating
    loading...

    Posted by Shekhar | September 21, 2008, 6:23 pm

Post a comment

Overslept last night to keep my eyes open for a long meeting at UNESCO. But still wish to have a power nap before the meeting ;)
29 minutes ago, comment
Your brain may be overflowing with new ideas today and your se... More for Leo http://twittascope.com/twittascope/?sign=5
29 minutes ago, comment
For the fans RT @wordpress WordPress personas for Firefox: http://short.to/1goju
3 hours ago, comment
Hit by Twitter rate limit in a project. Requested client 2 fill http://tinyurl.com/ye6zwrh Within 24 hrs got mail: 20K requests/hr in 48 hrs
3 hours ago, comment
New blog post: Drupal 6: Different Page Templates for different Content Types http://bit.ly/bfX1yc
3 hours ago, comment