Now Serving Feed Enclosures

Album Cover: The Future

"The maestro says it's Mozart, but it sounds like bubble gum."
Leonard Cohen / Waiting For The Miracle

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.

Comments

dallas moving services kmmovers.com 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?

Permalink

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.

Permalink

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

Permalink

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.

Name:

Email Address:

Website:

Comments:

Check this box if you hate spam.