What’s the point?
I built this example to serve a few purposes. First, I wanted to show
off the power of the HTML5 History API. By using
replaceState
— I'm able to change the full URL as you
scroll. Since replaceState
doesn't add to the back button
stack, the back/forward buttons still work as expected.
I also wanted to show how infinite scrolling can be awesome.
Page numbers don’t make sense in infinite scrolling — but incremental updates do.
That's why this example uses max_id
to mark your position
and not a page number.
This adds up to my version of a utopian paging example. Users never have to click paging links — new content magically streams in. But if you share the URL in your address bar with a friend over chat, they'll see the same thing you see.
But really, it's all pretty boring. Why? Because it works like you'd expect the web to work. Which is how things should be. And it's how I wish infinite scrolling sites like Facebook, Twitter and Tumblr acted.