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.

2222 questions
9
votes
1 answer

Add/remove elements to either side of DOM without affecting scroll position?

Is there any way to position elements or some clever hack in such a way to allow for adding or removing elements from either the top or bottom of the DOM without affecting the scroll? I've tried using Jquery to measure the length of the…
Rockster160
  • 1,579
  • 1
  • 15
  • 30
9
votes
1 answer

Ngx infinite scrolling - Template parse errors: Can't bind to 'infiniteScrollDistance' since it isn't a known property

I installed ngx infinite scrolling ngx-InfiniteScroll using : npm install ngx-infinite-scroll --save In my app.module I added : import {InfiniteScrollModule} from 'ngx-infinite-scroll'; And in my imports I added : imports: [ BrowserModule, …
user9081339
9
votes
1 answer

Complex continuous scroll loop

I have a code similar to:
Franckl
  • 1,401
  • 2
  • 12
  • 17
9
votes
1 answer

It is possible to move a tiled background? (infinite scroll with TileMode.REPEAT)

I am developing a game First of all my game will be very simple, so i would prefer not to use libraries or opengl or canvas, i would prefer to achieve this with simple imageviews or normal views, or at least by the simplest way possible. For example…
NullPointerException
  • 36,107
  • 79
  • 222
  • 382
9
votes
1 answer

ExtJS 4.1 Infinite Grid Scrolling doesnt work with Dynamic store using loadData

I have to load first grid panel on tab and then load data into store using loadData() function which is working fine, but now I have to integrate infinite grid scrolling with it. Is there any way to integrate infinite scrolling on fly after loadData…
Keyur Vaghani
  • 206
  • 3
  • 8
9
votes
3 answers

How to implement UITableView infinite scrolling

I need to make a dynamic UITableView that supports Infinite Scrolling in both directions. I need to make it to where it doesn't loop, rather it just keeps going in the direction since it will be dealing with dates. The tableView is going to be in a…
9
votes
4 answers

Content flicker/jump on infinite scroll/loop

I am looking for help / a point in the right direction / or a solution for a flicker/jump, when scrolling on a looping/infinite website, which can be seen in this fiddle. What seems to be causing the jump is: "$(window).scrollTop(half_way -…
DBUK
  • 1,373
  • 1
  • 23
  • 41
9
votes
2 answers

Implementing Infinite Scrolling with jquery

I am working on a project that uses the jQuery Masonry and Infinite Scroll plugins to load "n" amount of pictures from instagram using their API. Looking at this short example my understanding is that I need to have before hand the html pages to be…
Bartzilla
  • 2,768
  • 4
  • 28
  • 37
9
votes
2 answers

How does Facebook achieve infinite scrolling?

My first question is how do they get this scroll bar? http://dl.dropbox.com/u/12337149/scrollbar.png I have seen it in a few places so I presume it might be in a public library? My second question relates to the infinite scrolling itself. Once…
Hoa
  • 19,858
  • 28
  • 78
  • 107
8
votes
1 answer

imagesLoaded method not working with JQuery masonry and infinite scroll

I've been using JQuery masonry and now I'm adding infinite scroll. There are images in nearly every masonry "brick" and before I was using infinite scroll the images loaded fine and everything was great. I added the next part of the javascript for…
wuliwong
  • 4,238
  • 9
  • 41
  • 69
8
votes
3 answers

Flutter - how using SliverAppBar with Infinite Scroll Pagination?

I using Infinite Scroll Pagination plugin in my flutter's app. I need also using SilverAppBar in my page. This is my code: return Scaffold( body: DefaultTabController( length: 2, child: NestedScrollView( headerSliverBuilder:…
FetFrumos
  • 5,388
  • 8
  • 60
  • 98
8
votes
1 answer

How to implement infinite scroll in next js?

Infinite scrolling in next js is not working, the same code works on normal create-react-app
8
votes
2 answers

Scrolling to the bottom of a div in puppeteer not working

So I'm trying to scrape all the concerts in the boxed off area in the picture below: https://i.stack.imgur.com/7QIMM.jpg The problem is the list only presents the first 10 options until you scroll down in that specific div to the bottom, and then it…
8
votes
1 answer

Pagination / Infinite scrolling in Flutter with caching and realtime invalidation

It's been a long time since I started to search for a Flutter ListView library that will allow me to use pagination in a smart way. Sadly I haven't found anything that meets my criteria: Smart pagination: the library should't simply increase a list…
8
votes
4 answers

Detect bottom of page to fetch more data in react

I've try several code from several resources to detect if the user already reach the bottom of the page then do fetch more data. Its working but the function always fetch the data whenever I scroll, not whenever the user reach the bottom. Here is my…
Akza
  • 1,033
  • 3
  • 19
  • 37