Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does pagination on Reddit's home page work?

Reddit uses a time decay algorithm. That would mean the sort order is subject to change. When a user goes to page 2, is there a mechanism to prevent them from seeing a post that was on page 1 but was bumped down to page 2 before they paged over? Is it just an acceptable flaw of the sort method? Or are the first couple of pages cached for the user so this doesn't happen?

Side note: It's my understand that Digg cannot suffer from this issue but that HackerNews and Reddit can.

like image 918
Jared Brown Avatar asked Sep 26 '10 03:09

Jared Brown


1 Answers

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

like image 137
methodin Avatar answered Nov 20 '22 02:11

methodin