Pagination in feeds like ATOM and RSS?
23,423
Solution 1
It appears that ATOM allows the following syntax (first Google result for 'ATOM feed next/previous
'):
<link rel="self" type="application/atom+xml" href="http://www.syfyportal.com/atomFeed.php?page=3"/>
<link rel="first" href="http://www.syfyportal.com/atomFeed.php"/>
<link rel="next" href="http://www.syfyportal.com/atomFeed.php?page=4"/>
<link rel="previous" href="http://www.syfyportal.com/atomFeed.php?page=2"/>
<link rel="last" href="http://www.syfyportal.com/atomFeed.php?page=147"/>
I can't find anything on RSS, but as it's called "really simple syndication" I'd imagine such functionality is outside its scope.
Solution 2
This is defined in RFC 5005, Feed Paging and Archiving, section 3.
You can use first, previous, next and last as a link relation:
<link rel="next" href="http://example.org/index.atom?page=2"/>
An additional "type" attribute is not needed.
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on May 07, 2020Comments
-
Admin about 4 years
Is this even possible?
Perhaps?
<link rel=“next” type=“application/atom+xml” href=”[//path/page2]”></link>
-
panzi over 11 yearsRSS also stands for RDF Site Summary. ;) There are lots of differences between RSS 1.0 and 2.0 (there actually different standards, not really different versions).
-
Knowleech over 7 yearsActually, it is even recommended to use the <atom:link>s in RSS 2 feeds: validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
-
Sergey Ponomarev about 4 yearsThis is implemented in blogspot.com feed altogether with opensearch tag that shows total count. Unfortunately not all rss readers supports this yet but hope this is a matter of time