Now Serving Feed Enclosures

Album Cover: Life After Death

"While your gun's raisin', mine is blazin'."
The Notorious B.I.G. / I Love the Dough

Posted on April 26, 2008 12:41 AM in Web Development
Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

A couple months later, I finally got around to experimenting with the enclosure tag in my web feed. Using the sample provided by the Google Reader team, I updated my feed generation script to look for any instances of the object tag in my post (I only ever use these when embedding video) and copy the data URI directly into an enclosure element in my feed.

Sure enough, as proven by my previous post, the change seems to have worked as I now see the video from that post appearing in Google Reader. There is one slight problem, though. According to the Feed Validator and the RSS 2.0 Specification, the length attribute of the enclosure element is required (contrary to previous hopes), and as I've indicated here before, I have no idea how to responsibly generate the value of the length attribute without resorting to somewhat hackish (though creative) techniques of which I'd rather steer clear.

As an attempt at working around the problem, I've added a length attribute to the enclosure element, but I've left its value empty hard-coded its value as 0. I'll have to throw my feed at the Feed Validator again and see if that makes it happy, since Google Reader obviously doesn't care.

I'd be interested in hearing if the new enclosure method is resulting in the videos I embed showing up in feed readers other than Google Reader as well.


dallas moving services on August 24, 2016 at 10:30 PM:

I high appreciate this post. It’s hard to find the good from the bad sometimes, but I think you’ve nailed it! would you mind updating your blog with more information?


Niche Relevant backlinks services on September 03, 2016 at 1:19 AM:

A debt of gratitude is in order for giving late reports with respect to the worry, I anticipate read more.


DJ on September 10, 2016 at 12:03 AM:

This is actually the kind of information I have been trying to find. Thank you for writing this information. followers instagram|instagram like


netflix on October 10, 2016 at 1:08 AM:

Decent information picking up article. This post is truly the best on this profitable subject. minecraft download free full game
netflix account and password


pnnouhls on May 15, 2017 at 5:22 AM:

Post Comments

If you feel like commenting on the above item, use the form below. Your email address will be used for personal contact reasons only, and will not be shown on this website.


Email Address:



Check this box if you hate spam.