# \[Screencast\] Infinite Scrolling

**URL:** <https://metaruby.com/t/screencast-infinite-scrolling/511>\
**Category:** Learning Ruby\
**Tags:** javascript, rails\
**Created:** [May 16, 2016, 12:36pm UTC](https://metaruby.com/t/screencast-infinite-scrolling/511 "2016-05-16T12:36:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kobaltz](https://metaruby.com/user_avatar/metaruby.com/kobaltz/32/982_2.png) [@kobaltz](https://metaruby.com/u/kobaltz)\
**Post date:** [May 16, 2016, 12:36pm UTC](https://metaruby.com/t/screencast-infinite-scrolling/511/1 "2016-05-16T12:36:14Z")

</div>

[[Screencast] Infinite Scrolling ](https://www.driftingruby.com/episodes/infinite-scrolling)

Infinite scrolling is now a common feature and there are several cases where it is really useful. For instance there are some websites where we simply can’t imagine a good pagination system, like Twitter or even Facebook.

---

<div class="post-metadata">

**Author:** ![glebm](https://metaruby.com/user_avatar/metaruby.com/glebm/32/976_2.png) [@glebm](https://metaruby.com/u/glebm)\
**Post date:** [May 17, 2016, 8:17am UTC](https://metaruby.com/t/screencast-infinite-scrolling/511/2 "2016-05-17T08:17:02Z")

</div>

When using will\_paginate, each subsequent “page” will take longer and longer to load because will\_paginate uses `OFFSET`. For infinite scroll you really want to use keyset pagination instead, e.g. [GitHub - glebm/order\_query: Find next / previous Active Record(s) in one query](https://github.com/glebm/order_query).

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [May 17, 2016, 11:35am UTC](https://metaruby.com/t/screencast-infinite-scrolling/511/4 "2016-05-17T11:35:26Z")

</div>

Do you have a full example of using order\_query for pagination in a Rails app?

---

<div class="post-metadata">

**Author:** ![glebm](https://metaruby.com/user_avatar/metaruby.com/glebm/32/976_2.png) [@glebm](https://metaruby.com/u/glebm)\
**Post date:** [May 17, 2016, 11:59am UTC](https://metaruby.com/t/screencast-infinite-scrolling/511/5 "2016-05-17T11:59:32Z")

</div>

I haven’t got around to making an example app yet, unfortunately.

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [May 17, 2016, 12:11pm UTC](https://metaruby.com/t/screencast-infinite-scrolling/511/6 "2016-05-17T12:11:43Z")

</div>

Well, I’ll keep my eye out then.
