Questions tagged [infinite-scroll]

Infinite Scrolling, also known as endless scrolling, is a technique that is widely used by websites and Web applications that host lots of content on a page where pagination would traditionally have been used. Infinite scrolling involves initially loading only one page of content. As the user scrolls down, the browser fetches another page via an AJAX request. There are several Infinite Scrolling plugins that facilitate this technique in modern browsers.

Background:

In Web 1.0 applications, it is common to see pagination used to limit the browser from displaying all of the data in a set all at once. Pagination allows a subset of the data to be displayed on the page, which reduces the memory footprint and decreases the lag-time caused by too much visible markup being displayed in the DOM.

Pagination involves "next" and "prev" links as controls in which a user uses to traverse through the data. This technique is facilitated through either full page reloads, where clicking next reloads the page with the next data subset, or it's facilitated through AJAX, where the application replaces a portion of the page with the next set of data.

Some Infinite Scrolling plugins, such as the Infinite Scrolling - A jQuery Plugin simply extend this type of pagination by hiding the "prev" and "next" hyperlinks and automating the click through process by monitoring the scrollTop position, while others do not.

Thus, for websites and web applications with an existing legacy pagination technique, a plugin that extends existing functionality may be more desirable.

Example of the Infinite Scrolling Technique:

An real-life example of the infinite scrolling technique is found here

Infinite scrolling plugins:

Below is a list of some widely known Infinite Scrolling plugins:

When should I use this tag?

You should use the [infinite-scroll] tag on questions where you know or reasonably believe through trial and error that the problem you're facing is related to an infinite scroll plugin or an infinite scroll technique.

For example, this question is asked by a user who was having problems getting the jQuery Infinite Scroll plugin to work. The error the user is seeing only appears when the plugin is loaded, which implies that the plugin is involved in the problem.

It's not helpful to tag a question with a tag that isn't specifically involved in the problem, so an example of a situation where I wouldn't use the tag would be if the Infinite Scroll plugin or technique was working great, yet I had problems making an AJAX call to the server. Additionally, the problem occurs with or without the plugin; therefore, I would not use that tag in this specific scenario.

Advanced Techniques:

The majority of the Infinite Scroll plugins that exist, in general, only offer one way scrolling functionality. In other words, as the user scrolls down, more content is added. However, in most cases, the content above the visible viewing area remains actively loaded in the DOM.

As users scroll down long enough, they may begin to experience a lag as more and more memory is consumed by the browser. With enough content, this could theoretically cause a browser crash.

Ben Nadel writes a blog post covering Bidirectional Infinite Scroll. While there is no demo, in the blog post, he includes a video that demonstrates the technique.

For Bidirectional Scroll, there exists no plug-in at this time, at least none that are easy to find. The bidirectional technique is much harder to implement than the one-way technique.

The difficulty comes not from implementing two directions per se, but instead the difficulty manifests itself when attempting to implement scrolling that loads content above the visible area, such as when the user scrolls up. When scrolling down, new content added to the page does not affect the visible viewing area. While users may see the scrollbar move, the content itself is not affected.

But when content is loaded on top, the visible scroll area shifts, and the user experiences a jarring effect. Ben Nadel's technique involves storing the scrollTop position prior to loading in new content on top, and then once the content loads, a new scrollTop is quickly calculated before the user experiences any side effects.

1977 questions
114
votes
3 answers

ReactJS: Modeling Bi-Directional Infinite Scrolling

Our application uses infinite scrolling to navigate large lists of heterogenous items. There are a few wrinkles: It's common for our users to have a list of 10,000 items and need to scroll through 3k+. These are rich items, so we can only have a…
noah
  • 20,296
  • 17
  • 59
  • 84
94
votes
3 answers

Infinite scrolling with React JS

I am looking at ways to implement infinite scrolling with React. I have come across react-infinite-scroll and found it inefficient as it just adds nodes to the DOM and doesn't remove them. Is there any proven solution with React which will add,…
Rajeev
  • 4,222
  • 7
  • 33
  • 52
72
votes
7 answers

infinite-scroll jquery plugin

I am trying to set up infinite-scroll on a site I am developing with Coldfusion, I am new to javascript and jquery so I am having some issues wrapping my head around all of this. Do I need to have pagination on my site in order to use the…
rajh2504
  • 1,256
  • 2
  • 18
  • 37
55
votes
4 answers

infinite scroll with ember.js (lazy loading)

I have a view where there can be a large number of items for the user to scroll through and I'd like to implement infinite scrolling to enable progressive loading of the content. It looks like some folks have done pagination but Google doesn't…
outside2344
  • 1,959
  • 1
  • 26
  • 50
46
votes
10 answers

Changing ViewPager to enable infinite page scrolling

Jon Willis has posted on how to enable an infinite scrolling with his code. In there he said that he made some changes in the ViewPager class int the android support library. Which changes have been made and how is it possible to "recompile" the…
thehayro
  • 1,484
  • 2
  • 15
  • 24
39
votes
1 answer

How is it possible to run multiple instances using Backbone.Paginator.js?

I am trying to use Backbone.Paginator.js to run more than one app (multiple instances of paginator) on the same page. I created a test page. (Navigate to backbone.paginator/examples/netflix-infinite-paging). I left the code as is for app.js and…
Steve
  • 4,435
  • 8
  • 36
  • 59
35
votes
4 answers

RecyclerView ScrollListener inside NestedScrollView

I have an EndlessRecyclerView at the end of a NestedScrollView. EndlessRecyclerView means: when user scrolls to the bottom of the recyclerView it loads more data. This is already implemented and working elsewhere but when I put the recyclerView…
35
votes
6 answers

angularjs infinite scroll in a container

I'm trying to use angularjs infinite scroll It seems to work only if the scroll is relative to the browser window. I would like to do infinite scroll in an inner DIV, i.e. I have a page with a generic wrapper and an inner div for displaying the…
Elia Weiss
  • 5,417
  • 8
  • 50
  • 81
32
votes
2 answers

Adding items to Endless Scroll RecyclerView with ProgressBar at bottom

I followed Vilen's excellent answer on SO: Put an indeterminate progressbar as footer in a RecyclerView grid on how to implement an endless scroll recyclerview with ProgressBar. I implemented it myself and it works but I would like to extend the…
Simon
  • 18,312
  • 22
  • 130
  • 197
29
votes
3 answers

RecyclerView getChildCount() and getItemCount() returns same value

RecyclerView has an InfiniteScrollListener and inside that listener, in OnScrolled() method I calculate visible and total item count to check if new items should be loaded. When totalItemCount and visibleItemCount are the same, it causes an infinite…
dgngulcan
  • 2,693
  • 1
  • 21
  • 26
28
votes
4 answers

View with continuous scroll; both horizontal and vertical

I have been struggling with this assignment for quite some time now. What I would like to develop is a scrollview or collectionview which scrolls continuously both vertical and horizontal. Here is an image of how I think this should look like. The…
Paul Peelen
  • 9,588
  • 15
  • 82
  • 162
26
votes
6 answers

Instead of UICollectionView a black screen is displayed

I'm trying to reimplement the infinitive scrolling UICollectionView seen here. Things that were missing for me: ViewController.h: @interface ViewController : UIViewController
testing
  • 17,950
  • 38
  • 208
  • 373
22
votes
1 answer

jQuery Infinite Scroll - event fires multiple times when scrolling is fast

Okay, the code below "works" in that when you scroll to the bottom of the page the AJAX function is fired and results are appended to the #postswrapper div on the page. The issue is: if I scroll really quickly when I reach the bottom of the page,…
Marc
  • 233
  • 1
  • 2
  • 5
22
votes
8 answers

RecyclerView Endless Infinite Scrolling Issue

I am trying to implement Endless Infinite Scrolling with RecyclerView, but I am only getting first 10 records, not getting next 10 records and even not getting any progress while trying to scroll at bottom. Whereas I was suppose to get next 10…
Oreo
  • 2,480
  • 8
  • 35
  • 61
22
votes
2 answers

Scraping a dynamic ecommerce page with infinite scroll

I'm using rvest in R to do some scraping. I know some HTML and CSS. I want to get the prices of every product of a URI: http://www.linio.com.co/tecnologia/celulares-telefonia-gps/ The new items load as you go down on the page (as you do some…
Omar Gonzales
  • 2,878
  • 7
  • 38
  • 83
1
2 3
99 100