How does pagination on Reddit's home page work?

▼魔方 西西 提交于 2019-12-05 09:35:39

From the next URL you see: http://www.reddit.com/?count=25&after=t3_dj7xt

So clearly the next page ensures that the page2 starts at the post after t3_dj7xt - whatever that translated to. This could be accomplished using IDs so you'd pass after=188 then the next page starts at 189 thus ensuring you don't see the same post if a time delay occured

Aaron Jackson

It might be using the last ID as opposed to limiting from. Take these two examples of SQL:

SELECT * FROM Stories WHERE StoryID>$LastStoryID;

rather than:

SELECT * FROM Stories LIMIT 20, 10;
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!