Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Now, if I want all these pages to point to the newest page -- how do I do that?

You just link to the root. It's conceptually page 600, but you don't actually have to specify the number. Imagine that the blog is you writing pages sequentially in a book. The oldest content is on page one; the newest content is on the last page. You don't need an explicit number to get to the newest content if you use the convention that an unspecified number means to go to the last page.



Ok, let's continue: How many items should be on the root page?

Say it had 10 items (full page size). But then 1 new item was posted. Should we create new root page with just 1 item?

Should we ask users to click on pager after viewing just one item in search results?


If the root page has less than a full page of items, I would also have it load the full next page, and the "next" link would go to page 3. So your first page might have from 10 up to 19 results, then every page after that would have 10.

The other option is to use a "start" parameter which is the offset of the first item to load, and you always load that item + the next 9. However this means you have N cached pages instead of N/10.


first page might have from 10 up to 19 results

So the number of items on the most popular page (root) would fluctuate a lot.

I don't think that would make my users happy.

I don't understand your other option. Are you suggesting not to show 0...9 most recently posted items on the first page?


Assume that an incrementing id is assigned to blog posts. The first page would always have the 10 most recent items. The "next" link would look like "/blog?offset=500". So when you click that, you get the items numbered 500-491, and the "next" link on that page is "/blog?offset=490". Admittedly the URLs are ugly, but the advantage is that the contents don't change when items are added, only when they are deleted (the same can't be said for the page=N scheme).


In this scenario up to 9 items on second page may overlap with items on the first page, right?

That would be confusing to users.

Besides, I still see no business advantage of making content hardwired to certain page. If anything, it's better to change page content from SEO perspective.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: