Blogs, Internet radio shows, and Internet TV shows all syndicate themselves using RSS or Atom feeds. But how do you tell the difference between the different kinds of feeds‽
How do you know if a feed is for an Internet TV show (all full of videos), or for an Internet radio show (containing only audio), or if the feed is for a news site (and only contains text news articles) without having to actually download, read and understand the feed‽ Sure if you are a human you may be able to figure it out (based on what's on the webpage that links to the feed); but what about machines‽ What about browsers, search engines, web crawlers, and other kinds of software‽ How will they be able to figure it out‽
Luckily HTML already provides a solution to this. We (Internet TV show makers) just have to use it. Here's how.
Before getting into the solution though it's important to understand how feed syndication is currently done. (This requires some knowledge of HTML. If you do NOT understand HTML, then you may want to get whomever made your Internet TV software to look at this article to make sure that your Internet TV software gets this added.)
So first a little background information. (Note, if you already know how feed auto-discovery is done you can just skip to the next section.)
Long ago the only way you could find RSS feeds was by manually searching through a blog or news site (or whatever) and try to find the feed link. Sometimes they were easy to find; but all too often they weren't. (People put them in different places on the page. Some people linked them in with text. Some people linked them in with images. And people used different kinds of text and images to link them in. Not to mention the whole usability problem with RSS and Atom not being handled by the browser in a useful way.)
Now, in addition to this (at that time) most machines (like browsers, search engines, web crawlers, and other kinds of software) could NOT find these RSS feed links. This impact of this problem is probably far worse than you may realize.
<link rel="alternate" type="application/rss+xml" href="http://example.com/feed" title="Example" />
Code like this is put in the
<head> of the home page of one's blog, news site, etc. And it makes it so that it is easy to find RSS (and Atom) feeds of a site.
And if you wanted to use RSS auto-discovery on another page on the same site, other than the home page, then you might use code like the following....
<link rel="home" type="application/rss+xml" href="http://example.com/feed" title="Example" />
(Note that the
rel attribute has changed. Where it was
rel="alternate" in the previous example, here it is
RSS Feed auto-discovery worked great! Now it was relatively trival for both humans and machines to find RSS (and later Atom) feeds.
For humans, there were bookmarklets to automagically find these RSS and Atom feeds, with a single click. (Later on native browser support was added, which made things even easier.) And for machines, it finally became simple to find RSS and Atom feeds.
But as time went on, RSS and Atom feeds found uses amoung other things besides just text-dominated blogs and news sites. We started seeing RSS and Atom feeds being used to syndicate Internet radio shows (also known as podcasts). And saw RSS and Atom feeds being used to syndicate Internet TV shows (also know as vlogs, vidcasts, vodcasts, videoblogs, etc).
Even with feed auto-discovery, we had a new problem.
People typically handle the different kind of feeds differently. (Typically, people use one program to read their blog and news feeds. Another program to listen to their Internet radio feeds. And yet another program to watch their Internet TV feeds.) What's needed is a way for both humans and machines to be able to tell the different kinds of feeds apart.
HTML and TV
Although most people probably don't know it, HTML actually has some facilities for dealing with TV. (Remember, Internet TV is a form of TV; so these facilities are useful and relevant for us Internet TV makers.)
In particular the HTML
<link> element has a way of "saying" that what it links to is meant for TV. (Which is great since RSS and Atom feed auto-discovery is done with the HTML
<link> element.) This is done with the media attribute of the HTML
Internet TV Feeds
The easiest thing to do at this point is to just show the two previous examples transformed into Internet TV feeds. The first example is below.
<link media="tv" rel="alternate" type="application/rss+xml" href="http://example.com/feed" title="Example" />
And here's the second example.
<link media="tv" rel="home" type="application/rss+xml" href="http://example.com/feed" title="Example" />
Note that the only change is the addition of
media="tv". That's it. That's how easy it is to mark your feed as an Internet TV feed.
Extra Info for Software Engineers
If you are just creating your own Internet TV show (and NOT writing software), then you do NOT have to read this last section. This is just here to help people who create machines (like browsers, search engines, web crawlers, etc) to write their software.
If you are writing software then you should note the following points.
You can tell which
<link>elements point to feeds by the MIME type given in the
typeattribute. (Note, we're talking about any kind of feed in this point. Not just Internet TV feeds.)
(Refer to #3 for a list of feed MIME types. Also, make note of #7 when trying to get the MIME type from the type attribute of the
There are 2 things that mark a
<link>element as pointing to an Internet TV feed.
(A): it has a feed MIME type. (Refer to #3 for a list of the different feed MIME types. Also pay attention to #7 when trying to figure out the MIME type for a
And (B): it has
tvas a media descriptor. (Make note of #6 when trying to figure out the media descriptor(s) given by the media attribute of the
- There are 2 different MIME types you should be watching for. (One is for RSS and the other is for Atom.) They are:
Currently (at the time of writing this article), these are the only feed MIME types.
relattribute (of the HTML
<link>element) has NO importance in terms of finding feeds. (Whether it be an Internet TV feed, or any other kinds of feed.)
People tend to think that it must be
rel="alternate". But this is wrong! (It could be that, but it doesn't have to be. It could be
rel="apple orange banana", or anything else.)
Refer to Section 6.12 of the HTML 4.01 specification for more information on the meanings of these different relations.
relattribute can contain more than one relation. For example, instead of just having:
We could have:
rel="alternate example something"
relattribute contains a space separated list of link types.)
mediaattribute can contain more than one media descriptor. For example, instead of just having:
We could have:
media="screen, tv, 3d-glasses, print and resolution > 90dpi"
Both of these have
tvas a media descriptor.
Refer to Section 6.13 of the HTML 4.01 specification for more info on media descriptors.
typeattribute of the HTML
<link>element contains a content type and not just a MIME type. Therefore a type like the following:
Has the exact same MIME type as the type below:
type="application/rss+xml; a=b; c=d;efghi="Hello World!""
Both of these have the RSS MIME type of
Refer to Section 14.17 of RFC 2616 for more information on content types.
There is an HTTP header with equivalent semantics to the HTTP
<link>element. It is the HTTP
Linkheader. For example:
HTTP/1.1 200 OK Link: <http://example.com/feed>; rel=alternate; type="application/rss+xml"; media=tv
For more information on the HTTP
Linkheader refer to section 22.214.171.124 of RFC 2068.
So, for anyone who skipped reading the article, and just wanted to read the summary, all you need to do to mark your feed as an Internet TV feed is to add the following attribute to your feed
<link media="tv" rel="banana" type="application/rss+xml" href="http://example.com/feed" title="Example" />
It's that simple!