Digizap

Your digital pocket knife.

Your IP: 216.73.217.62

Knowledge base

Nourishment in the head: how a site advertises its feeds

A feed is an address a site announces in its head: one line of HTML with rel=alternate, the feed type and the address of the feed. That one line is the whole address book — a feed reader entering a site reads that head first and then knows where to knock. If the line is not there, only guessing remains: guessing toward standard paths.

Three content types carry feeds: application/rss+xml for RSS, application/atom+xml for Atom and application/feed+json for JSON Feed — the youngest of the three, a JSON object with a title and an array of items. RSS and Atom are XML forms with the same three parts: a feed with a title, entries or items as repeated blocks, and per entry a date. RSS uses pubDate, Atom uses updated and published, JSON Feed uses date_published and date_modified.

The Feed finder tool reads those announcements through our server and measures every announced feed: does it come back, and does it come back as a feed? Then it walks five standard paths separately — because a feed that stands without being named in the head is a finding too.

1. The head is the address book

The announcement lives in the head of every page that nourishes: rel=alternate with a feed type, an href to the address of the feed and — optional but helpful — a title that names the feed. Several announcements on one page are normal: RSS and Atom side by side, or one language variant per feed. What is not there does not exist for a feed reader: the reader executes no JavaScript and does not guess.

The content type in the announcement is a promise, not a fact. The tool measures the promise: the announced feed is fetched and the real content type of that answer is laid next to the declaration. A declaration that returns 404 is a dead reference; a path that returns HTML — often the catch-all route of a single-page app that serves its own page on every unknown path — is an empty hand to a feed reader, even when the browser cheerfully makes do with it.

2. The three shapes, read from the document

RSS is the oldest form and still the most pasted one: a channel with items, each with title, link and pubDate. Atom is the streamlined younger brother from the same RFC family: a feed with entries, where updated is the truth and published the birth date. JSON Feed drops the XML: an object with title, home_page_url and items, readable by any JSON parser — but then the content type had better say application/feed+json, because application/json leaves feed readers guessing what the object is supposed to be.

The entry count is not an estimate: the tool counts the repeated blocks as they stand in the document — item by item, entry by entry, array element by array element — and reports the newest date from the document’s date fields. A feed with no entries is formally sound and empty: a measured fact, not a verdict about its maker.

3. Standard paths and the border of the list

Who has no head often lives on a standard path: /feed, /rss, /feed.xml, /atom.xml and /index.xml are the paths publishing software leaves behind and feed readers try. The Feed finder probes those five separately on the same origin and reports what came back. A found feed without announcement in the head is a warning: the nourishment exists, but the door is not signposted — a reader that only reads the head will not find it.

The list is fixed and the border is honest: a feed on its own path that stands neither in the head nor on the five paths stays out of view. What only JavaScript places into the head does not stand in the HTML our server receives and is not seen. A site that feeds seriously does it double: announce in the head and stand on a findable path — then both kinds of readers find it.

Measure it yourself: Feed finder

See which feeds a page advertises and which ones really stand: rel=alternate declarations measured on status and content type, five standard paths probed separately, and a URL that is itself a feed parsed on the spot.

Read on