Pagination in feeds like ATOM and RSS?

前端 未结 2 1534
有刺的猬
有刺的猬 2020-12-14 06:57

Is this even possible?

Perhaps?

 
相关标签:
2条回答
  • 2020-12-14 07:19

    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.

    0 讨论(0)
  • 2020-12-14 07:20

    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.

    0 讨论(0)
提交回复
热议问题