5 ms·
Pages can be bookmarked easily, which can be incredibly important. Pages can be bookmarked easily only sometimes! Everybody seems to have adopted the same da
by seiji 15y ago
Pages can be bookmarked easily, which can be incredibly important.
Pages can be bookmarked easily only sometimes! Everybody seems to have adopted the same database-centric but user-hostile (and cache/crawler-hostile) approach to pagination of posts (see: any blog platform, engadget, tumblr, etc).
Their brain damaged flow goes: You make a new post. The new post appears at the top of the front page. But, the front page has a limited number of story slots. So, the oldest story on the front page gets pushed to page two. But page two has limited slots, so the oldest story on page two goes to page three. Repeat for every page. Some sites have tens to hundreds of thousands of "pages." (Preemptive note to future comment haters: I know the site doesn't "push" articles to every page because it's all just database queries, but the effect is the same.)
Every time you make a new post, you invalidate all thousand (ten thousand? 100k? million?) older pages. It's absolutely moronic. Google has no chance of keeping up. You make one new post and Google has to re-index thousands of pages.
The proper solution is to make pages "fill up" then have your root page point to the highest numbered page. Example: http://omgpagination.tumblr.com/ http://omgpagination.tumblr.com/ would logically be page 600, then the "Older Posts" button would link to page 599. Instead, everybody right now makes / always be page 1, "Older Posts" always links to page 2, etc. But those URLs aren't content stable and every update invalidates your cache of the entire site. Your oldest posts on your site should always be on page 1, not a moving target of page {TOTAL_POSTS / POSTS_PER_PAGE}.
In short: be a little more clever and do the right thing for your caches. What's good for your caches is inevitably good for your users too.
- gry 15y agoPagination is useful when a user needs to understand time and space for a given context. Infinite scroll is useful when the time and space is now for the context. As noted by both parents, implementations for both could be better.
- cfinke 15y agoEvery time you make a new post, you invalidate all thousand (ten thousand? 100k? million?) older pages. It's absolutely moronic. Google has no chance of keeping up. You make one new post and Google has to re-index thousands of pages. You shouldn't be allowing Google to index /page/2, /page/3, /page/4; that content is obviously going to change, and no user is ever going to search for "page 9 of the archives of example.com."
- seiji 15y agoYou would think so, but at least tumblr isn't restricting it: http://www.google.com/search?q=tumblr+/page/300 http://www.google.com/search?q=tumblr+/page/300
- mjwalshe 15y agono but they do try and group pagnation pages and wheer its the best result show a result deep inside pagnated pages.
- codinghorror 15y agogood point, but we sometimes delete questions from Stack Overflow and that'd also invalidate all pages (depending on how old the question was), would it not?
- grk 15y agoOr you could invalidate just one page and have it show up with one less result.
- ajuc 15y ago"Question deleted" item would help for that, and would also be more transparent for users than silent deletion (at the cost of a few more pages to show all items, becouse some items are deleted).
- pfraze 15y agoMmm, that's not a bad solution, but the clutter would bother me as a user. You might just remove the items from the page (20 per page, 5 deleted on this page, now only 15) but then you might get bare pages.
- dennisgorelik 15y agoNow, 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?
- BerislavLopac 15y agoThis is actually an excellent idea, I think I'll try it in some future projects of mine...
- obtu 15y agoLook at blogger urls (the updated-max parameter; reddit does something similar as well) to see an efficient and bookmark-friendly implementation of pagination. I disagree that /page/4/ style urls are a product of database-driven design; that seems to be driven by url legibility, a book metaphor, and convention. Total counts and large offsets are bad for databases because they involve many rows rather than the minimum necessary local information.
- Too 15y agoYES! Sometimes i read a few pages then get back the next day and click next and suddenly page 5 contains what was on page 1 yesterday. See http://www.yankodesign.com/page/2/ http://www.yankodesign.com/page/2/ for example of this madness.
- Too 15y agoI really like the way techmeme handles this, basically you can get a snapshot of how the front page looked like at any given time. Makes it more easy to find things you read a few days ago but didn't bother bookmarking and then later you realize you have to find it again. "Hmm, i read about it monday morning"...click click BANG! everything there just the way you remember it. On most other news sites i can usually not find old articles even after 15 minutes of searching with both google and the internal search.