Skip to content

Ask HN: how does HN's pagination work?

3 pointsfractalcat2 comments
On HN

Pure idle curiosity. Whenever I have to paginate through a list of sorted items, I just use page numbers. The param seems to be a hash of some kind, which might allow for things like persistent snapshots, but if so, why do the links expire?

Comments

The parameter looks up a closure ("fnid" means "function ID") in a hash/dictionary/whatever. When memory runs low, some (all?) of them get pruned. Hence, links expire.

I don't think it's a good architecture.

Ah, gotcha. Thanks.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.