4 ms·
Now, if I want all these pages to point to the newest page -- how do I do that? Every time when the newest page number changes (e.g. from 599 to 600), it invali
by dennisgorelik 15y ago
Now, if I want all these pages to point to the newest page -- how do I do that?
Every time when the newest page number changes (e.g. from 599 to 600), it invalidates all other pages anyway, right?
They all have to point to page 600 now.
Moreover, I have to make code, that generates link to my newest page more complex.
Another consideration: it could be beneficial from SEO perspective if content constantly shifts on older pages.
- defen 15y ago> 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.
- dennisgorelik 15y agoOk, 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?
- defen 15y agoIf 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.
- dennisgorelik 15y agofirst 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?
- defen 15y agoAssume 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).
- dennisgorelik 15y agoIn 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.