Reddit 主页上的分页是如何工作的?
Reddit 使用时间衰减算法。这意味着排序顺序可能会发生变化。当用户转到第 2 页时,是否有一种机制可以防止他们看到第 1 页上的帖子,但在翻页之前已跳至第 2 页?这只是排序方法的一个可接受的缺陷吗?或者是否为用户缓存了前几个页面,这样就不会发生这种情况?
旁注:据我所知,Digg 不会遇到这个问题,但 HackerNews 和 Reddit 却可以。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从下一个 URL 中您可以看到: http://www.reddit.com/?count= 25&after=t3_dj7xt
很明显,下一页确保 page2 从 t3_dj7xt 之后的帖子开始 - 无论翻译成什么。这可以使用 ID 来完成,因此您可以传递 after=188,然后下一页从 189 开始,从而确保如果发生时间延迟,您不会看到相同的帖子
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
它可能使用最后一个
ID
,而不是限制。以这两个 SQL 为例:而不是:
It might be using the last
ID
as opposed to limiting from. Take these two examples of SQL:rather than: