RFC 5005
Feed Paging and Archiving
RFC 5005: Feed Paging and Archiving π
Okay bestie, let's get into it π This is RFC 5005, written by M. Nottingham. It's a Standards Track doc from the Network Working Group, dated September 2007. The header doesn't list anything it obsoletes or updates, so it's just vibing on its own π¦
Status of This Memo β¨
This document specifies an Internet standards track protocol for the Internet community, and it wants discussion and suggestions for improvements π For the current standardization state and status of this protocol, check the "Internet Official Protocol Standards" (STD 1) doc. Distribution of this memo is unlimited π
Abstract π¦
This spec defines three kinds of syndicated Web feeds that let you publish entries across one or more feed documents. There are "paged" feeds for piecemeal access, "archived" feeds that let you rebuild the feed's contents, and feeds that are explicitly "complete" π
Table of Contents π
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 2
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Complete Feeds . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Paged Feeds . . . . . . . . . . . . . . . . . . . . . . . . . 4
4. Archived Feeds . . . . . . . . . . . . . . . . . . . . . . . . 6
4.1. Publishing Archived Feeds . . . . . . . . . . . . . . . . 8
4.2. Consuming Archived Feeds . . . . . . . . . . . . . . . . . 8
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
6. Security Considerations . . . . . . . . . . . . . . . . . . . 9
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7.1. Normative References . . . . . . . . . . . . . . . . . . . 10
7.2. Informative References . . . . . . . . . . . . . . . . . . 10
Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 12
Appendix B. Use in RSS 2.0 . . . . . . . . . . . . . . . . . . . 12
1. Introduction β¨
Syndicated Web feeds (formats like Atom [1]) often get split into multiple documents to save bandwidth, allow "sliding window" access, or for other reasons πΈ
This spec formalizes two types of feeds that can span one or more feed documents: "paged" feeds and "archived" feeds. It also defines "complete" feeds for when a single feed document explicitly represents all of the feed's entries π
Each one has its own vibe and trade-offs:
- Complete feeds hold the entire set of entries in one document. They're useful when you don't want to "remember" entries you've already seen π§
- Paged feeds split the entries among multiple temporary documents. They're useful when entries aren't long-lived or stable, and the client needs to access an arbitrary portion of them, usually in close succession πββοΈ
- Archived feeds split the entries among multiple permanent documents. They're useful when entries are long-lived and it's important for clients to see every single one π
Semantics for a feed that combines these types are undefined by this spec, so don't go there π
Even though they refer to Atom normatively, the mechanisms here can be used with similar syndication formats. Appendix B has one such use π
1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [2] π₯
This spec uses XML Namespaces [3] to uniquely identify XML element names. It uses the following namespace prefix for the namespace URI listed here π§
"fh": "http://purl.org/syndication/history/1.0"
1.2. Terminology
In this spec, "feed document" means an Atom Feed Document or a similar syndication instance document. It can hold any number of entries, and it may or may not be a complete representation of the logical feed π
A "logical feed" is the complete set of entries associated with a feed. A feed document, on the other hand, might only hold a subset of them π§©
"Head section" means a document's feed-wide metadata container. For example, it's the child elements of the atom:feed element in an Atom Feed Document π
This spec uses terms from the XML Infoset [4], but with a shorthand: the phrase "Information Item" is left out when naming Element Information Items. So when this spec says "element," it means an Element Information Item in Infoset terms π
This spec also uses Atom link relations to identify different types of links. For their syntax, see the Atom spec [1], and for specific values, check the IANA link relation registry π¦
Also, URI references in link relation values may be relative. When they're used, they must be absolutised, as described in Section 5.1 of [5] π
2. Complete Feeds π
A complete feed is a feed document that contains all of the entries of a logical feed. Any entry that isn't actually in the feed document SHOULD NOT be considered part of that feed π ββοΈ
For example, a feed that represents a ranking that changes over time (like "Top Twenty Records" or "Most Popular Items") shouldn't show newer entries right next to older ones. By marking this feed as complete, the old entries get tossed when it's refreshed ποΈ
The fh:complete element, when it's in a feed's head section, shows that the feed document it lives in is a complete representation of the logical feed's entries. It's an empty element, and this spec doesn't define any content for it π
Example: Atom-formatted Complete Feed
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:fh="http://purl.org/syndication/history/1.0">
<title>NetMovies Queue</title>
<subtitle>The DVDs you'll receive next.</subtitle>
<link href="http://example.org/"/>
<fh:complete/>
<link rel="self"
href="http://netmovies.example.org/jdoe/queue/index.atom"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Casablanca</title>
<link href="http://netmovies.example.org/movies/Casablanca"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Here's looking at you, kid...</summary>
</entry>
</feed>
This spec does not address duplicate entries in complete feeds π€·ββοΈ
3. Paged Feeds π
A paged feed is a set of linked feed documents that together contain the entries of a logical feed. There are no guarantees about how stable each document's contents are πΈ
Paged feeds are lossy. That means you can't guarantee that clients will be able to rebuild the logical feed's contents at a particular time. Entries can get added or changed while the pages are being accessed, and the client won't necessarily know it happened π
So clients SHOULD NOT present paged feeds as coherent or complete, and they shouldn't assume that they are π
Paged feeds are great when the number of entries is very large, infinite, or unknown. Clients can "page" through the feed and only grab the entries they need π
For example, a search engine might serve query results as a paged feed. That way, queries with huge result sets don't overwhelm the server, the network, or the client π
The feed documents in a paged feed are tied together with these link relations:
- "first" - A URI that points at the furthest-back document in a series of documents π
- "last" - A URI that points at the furthest-ahead document in a series of documents π
- "previous" - A URI that points at the document right before this one in a series of documents β¬ οΈ
- "next" - A URI that points at the document right after this one in a series of documents β‘οΈ
Paged feed documents MUST have at least one of these link relations present, and should contain as many as is practical and applicable π₯
Example: Atom-formatted Paged Feed
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<link rel="self" href="http://example.org/index.atom"/>
<link rel="next" href="http://example.org/index.atom?page=2"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>
This spec does not address duplicate entries in paged feeds π«Ά
To be continued, part 2 is coming up next π¦β¨
4. Archived Feeds β¨
okay so an archived feed is basically a bunch of feed documents that, when you put them together, rebuild every entry in a logical feed. no missing posts, no cap π
the glow-up here is that unlike paged feeds, archived feeds let clients do this without losing entries π the trick is publishing one subscription document plus (potentially) a whole pile of archive documents.
a subscription document is a feed document that always holds the most recently added or changed entries in the logical feed. think of it as the front page π
archive documents are feed documents holding the older entries. the set of entries in an archive document published at a particular URI SHOULD NOT change over time, and the URI for a particular archive document SHOULD NOT change over time either. stable is the vibe π¦
these link relations tie the subscription and archived feeds together:
prev-archive: a URI that refers to the immediately preceding archive document.next-archive: a URI that refers to the immediately following archive document.current: a URI that, when dereferenced, returns a feed document containing the most recent entries in the feed.
subscription documents and archive documents MUST have a prev-archive link relation, unless there are no preceding archives available. archive documents SHOULD also have a next-archive link relation, unless there are no following archives available. the linking is the whole point π
archive documents SHOULD indicate their associated subscription documents using the current link relation. and archive documents SHOULD also contain an fh:archive element in their head sections to say "hey, I'm an archive" π fh:archive is an empty element, and this specification doesn't define any content for it.
Example: Atom-formatted Subscription Document
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<link rel="self" href="http://example.org/index.atom"/>
<link rel="prev-archive"
href="http://example.org/2003/11/index.atom"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>
Example: Atom-formatted Archive Document
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:fh="http://purl.org/syndication/history/1.0">
<title>Example Feed</title>
<link rel="current" href="http://example.org/index.atom"/>
<link rel="self" href="http://example.org/2003/11/index.atom"/>
<fh:archive/>
<link rel="prev-archive"
href="http://example.org/2003/10/index.atom"/>
<updated>2003-11-24T12:00:00Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Scheduled To Run Amok</title>
<link href="http://example.org/2003/11/24/robots_coming"/>
<id>urn:uuid:cdef5c6d5-gff8-4ebb-assa-80dwe44efkjo</id>
<updated>2003-11-24T12:00:00Z</updated>
<summary>Some text from an old, different entry.</summary>
</entry>
</feed>
in this example, the feed archives are split into monthly chunks ποΈ the subscription document points to the most recent complete archive, "http://example.org/2003/11/index.atom", using the prev-archive relation. that document then points to the previous archive, "http://example.org/2003/10/index.atom", and so on, like a little chain of breadcrumbs π
the "2003/11" archive does NOT have a next-archive relation, because it's the most recent complete archive. although another archive ("2003/12") may be under construction, it would be an error to link to it before completion. π
ββοΈ
4.1. Publishing Archived Feeds
the requirement that archive documents be stable lets clients safely assume that if they've retrieved one in the past, it won't meaningfully change in the future π§ but that also means that if an archive document's contents do change, some clients may never find out about the changes. oof π
so if a publisher needs a change to be visible to all users (say, correcting factual errors), they should consider publishing the revised entry in the subscription document, in addition to (or instead of) the appropriate archive document. on the flip side, unimportant changes (like spelling corrections) might only be applied in archive documents. know your audience!! π
Publishers SHOULD construct their feed documents in such a way as to make duplicate removal unambiguous (see Section 4.2). this one's important bestie π«Ά
publishers are not required to make all archive documents available. they may refuse to serve an archive document (e.g., with HTTP status code 403 or 410), or be unable to serve it (e.g., with HTTP status code 404) π«
4.2. Consuming Archived Feeds
typically, clients will "subscribe" to an archived feed by polling the subscription document for recent changes π² if a URI contained in the prev-archive link relation hasn't been processed in the past, the client can "catch up" on any missed entries by dereferencing it and adding the contained entries to the logical feed. then it repeats this recursively, until it hits a prev-archive link relation that has already been processed (the end of the archive is indicated by a missing prev-archive link relation) or an error shows up βͺ
if duplicate entries are found, clients SHOULD consider only the most recently updated entry to be part of the logical feed β¨ if duplicate entries have the same update time-stamp, or no time-stamps are available at all, the entry sourced from the most recently updated feed document SHOULD replace all the other duplicates of that entry. main character energy for the newest copy π
in Atom-formatted archived feeds, two entries are duplicates if they have the same atom:id element. the update time of an entry is determined by its atom:updated element, and likewise the update time of a feed document is determined by its feed-level atom:updated element π°οΈ
Clients SHOULD warn users when they are not able to reconstruct the entire logical feed. for example, they could alert the user that an archive document is unavailable, or display pseudo-entries that tell the user some entries may be missing. transparency is everything π
5. IANA Considerations
this specification defines the following new relations, which have been added to the Link Relations registry π
- Attribute Value:
prev-archive- Description: A URI that refers to the immediately preceding archive document.
- Expected display characteristics: none
- Security considerations: See [RFC5005]
- Attribute Value:
next-archive- Description: A URI that refers to the immediately following archive document.
- Expected display characteristics: none
- Security considerations: See [RFC5005]
additionally, the "previous," "next", and "current" link relations should be updated to refer to this document π¦
6. Security Considerations
okay this section is serious, so pay attention π¨
feeds using this mechanism have the same security considerations as Atom [1]. encryption and authentication security services can be obtained by encrypting and/or signing the feed, as described in [1], and they may also be obtained through channel-based mechanisms (e.g., TLS [6], HTTP authentication [7]) and/or transport (e.g., IPsec [8]) π
feeds using these mechanisms could be crafted in such a way as to cause a client to initiate excessive (or even an unending sequence of) network requests, causing denial of service (either to the client, the target server, and/or intervening networks). π± clients can mitigate this risk by requiring user intervention after a certain number of requests, or by limiting requests either according to a hard limit, or with heuristics. servers can mitigate this risk by denying requests that they consider abusive (e.g., by closing the connection or generating an error). π‘οΈ
clients should be mindful of resource limits when storing feed documents. to reiterate, they are not required to always store or reconstruct the feed when conforming to this specification. they only need to inform the user when the reconstructed feed is not complete π
this specification does not define what it means when a logical feed's component feed documents have different security mechanisms applied. that's a plot hole we're leaving alone for now π
7. References
7.1. Normative References
- [1] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom Syndication Format", RFC 4287, December 2005.
- [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [3] Bray, T., Hollander, D., and A. Layman, "Namespaces in XML", World Wide Web Consortium First Edition REC-xml-names-19990114, January 1999,
<http://www.w3.org/TR/1999/REC-xml-names-19990114>. - [4] Tobin, R. and J. Cowan, "XML Information Set (Second Edition)", World Wide Web Consortium Recommendation REC-xml-infoset-20040204, February 2004,
<http://www.w3.org/TR/2004/REC-xml-infoset-20040204>. - [5] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.
7.2. Informative References
- [6] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.1", RFC 4346, April 2006.
- [7] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, "HTTP Authentication: Basic and Digest Access Authentication", RFC 2617, June 1999.
- [8] Kent, S. and K. Seo, "Security Architecture for the Internet Protocol", RFC 4301, December 2005.
- [9] Winer, D., "RSS 2.0 Specification", 2005,
<http://www.rssboard.org/rss-specification>.
Appendix A. Acknowledgements π§
the author would like to thank the following people for their contributions, comments, and help: Danny Ayers, Thomas Broyer, Lisa Dusseault, Stefan Eissing, David Hall, Bill de Hora, Vidya Narayanan, Aristotle Pagaltzis, John Panzer, Dave Pawson, Garrett Rooney, Robert Sayre, James Snell, Henry Story, and Franklin Tse. thank you all, you're literally the reason this spec exists π«Ά
any errors herein remain the author's, not theirs. π
Appendix B. Use in RSS 2.0 β¨
okay so bestie, we already covered how these extensions work with Atom feeds, but they're honestly just as useful in similar formats π¦ This informative appendix shows how they slot into an RSS 2.0-formatted [9] feed. It's giving practical π
In RSS 2.0 feeds, two entries are duplicates if they have the same guid element. RSS 2.0 doesn't define an entry's update time, but the feed-level update time can come from the lastBuildDate element, if it's there π°οΈ
RSS 2.0-formatted Complete Feed π
<?xml version="1.0"?>
<rss version="2.0"
xmlns:fh="http://purl.org/syndication/history/1.0">
<channel>
<title>NetMovies Queue</title>
<link>http://netmovies.example.org/</link>
<description>The DVDs you'll receive next.</description>
<fh:complete/>
<item>
<title>Casablanca</title>
<link>http://netmovies.example.org/movies/Casablanca</link>
<description>Here's looking at you, kid...
</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid isPermaLink="false"
>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</guid>
</item>
</channel>
</rss>
RSS 2.0-formatted Paged Feed π
<?xml version="1.0"?>
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Liftoff News</title>
<link>http://liftoff.example.net/</link>
<description>Liftoff to Space Exploration.</description>
<atom:link rel="next"
href="http://liftof.example.net/index.rss?page=2"/>
<item>
<title>Star City</title>
<link>http://liftoff.example.net/2003/06/news-starcity</link>
<description>How do Americans get ready to work with Russians
aboard the International Space Station? They take a crash course
in culture, language and protocol at Russia's Star City.
</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://liftoff.example.net/2003/06/03/starcity</guid>
</item>
</channel>
</rss>
RSS 2.0-formatted Subscription Document π§
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Liftoff News</title>
<link>http://liftoff.example.net/</link>
<description>Liftoff to Space Exploration.</description>
<atom:link rel="prev-archive"
href="http://liftoff.example.net/2003/05/index.rss"/>
<item>
<title>Star City</title>
<link>http://liftoff.example.net/2003/06/news-starcity</link>
<description>How do Americans get ready to work with Russians
aboard the International Space Station? They take a crash course
in culture, language and protocol at Russia's Star City.
</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://liftoff.example.net/2003/06/03/starcity</guid>
</item>
</channel>
</rss>
RSS 2.0-formatted Archive Document ποΈ
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:fh="http://purl.org/syndication/history/1.0">
<channel>
<title>Liftoff News</title>
<link>http://liftoff.example.net/</link>
<description>Liftoff to Space Exploration.</description>
<lastBuildDate>Fri, 30 May 2003 11:06:42 GMT</lastBuildDate>
<fh:archive/>
<atom:link rel="current"
href="http://liftoff.example.net/index.rss"/>
<atom:link rel="prev-archive"
href="http://liftoff.example.net/2003/04/index.rss"/>
<item>
<title>Upcoming Eclipse</title>
<link>http://liftoff.example.net/2003/05/30/eclipse</link>
<description>Sky watchers in Europe, Asia, and parts of
Alaska and Canada will experience a partial eclipse of the Sun
on Saturday, May 31st.</description>
<pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>
<guid>http://liftoff.example.net/2003/05/30/eclipse</guid>
</item>
<item>
<title>The Engine That Does More</title>
<link>http://liftoff.example.net/2003/05/27/vasmir</link>
<description>Before man travels to Mars, NASA hopes to
design new engines that will let us fly through the Solar
System more quickly. The proposed VASIMR engine would do
that.</description>
<pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>
<guid>http://liftoff.example.net/2003/05/27/vasmir</guid>
</item>
</channel>
</rss>
Author's Address ποΈ
Mark Nottingham
EMail: mnot@pobox.com URI: http://www.mnot.net/
Full Copyright Statement βοΈ
Copyright (C) The IETF Trust (2007).
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property π
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document, or the extent to which any license under such rights might or might not be available. It also doesn't represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat, and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification, can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. π
π¦ where this page comes from
- ietf: rfc5005 2007-09
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms