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
7
votes
1 answer

How to allow infinite scrolling in the both directions with md-virtual-repeat?

I've implemented an infinite horizontal scroll using md-virtual-repeat. It fetches 25 records each time when needed when I scroll to the right.
7
votes
2 answers

Restore scroll position on infinite scroll page

I have a website with an infinite scroll page, listing the newest ads. When user click on a preview of the ads it will redirect him to the product page. But when user click on back button, it can not restore scroll position. Note 1 : i will load 10…
7
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
7
votes
1 answer

ion-infinite-scroll firing extremely infrequently

I am trying to get ionInfiniteScroll to work - I have already gotten it to work in several other places in my app, and this page is actually almost identical to another page where it is working fine. When I scroll down nothing happens, no loading…
ewizard
  • 2,527
  • 4
  • 45
  • 94
7
votes
2 answers

Endless load more recyclerview inside nested scroll android

I have Recyclerview inside the nestedscrollview and I want to scroll the nestedscrollview to the buttom display loading and load more list to recyclerview. Here is my xml.
7
votes
2 answers

infinite ajax scroll pagination looping

I am using infinite ajax scroll. It is working as in I can click load more items and this loads the content. However ias should stop at the last page and show 'There are no more posts', instead it still shows the 'load more items' link which when…
user3312792
  • 1,001
  • 2
  • 12
  • 27
7
votes
2 answers

Strategery - InfiniteScroll Not Working

I wanted to implement infinite scrolling in my magento website so I installed the Strategery - InfiniteScroll extension but it is not working, first I thought it is because I still have pagination, but even after removing the paging toolbar it is…
MaX
  • 85
  • 7
7
votes
1 answer

Cannot use InfiniteScroll feature of ui-grid

Trying to use, without success, infinite scrolling feature of ui-grid. Both 3.0.0-v16 and current unstable script version (released 2 days ago) were used. I'm following the example of http://ui-grid.info/docs/#/tutorial/212_infinite_scroll . When…
Derek
  • 2,905
  • 3
  • 21
  • 31
7
votes
4 answers

Android infinite Scroll List view

I want to implement OnScrollListener to load more data, when scrolled to bottom, dynamically. Following code is giving me NullPointerException, but when I declare BusinessListDataAdapter adapter = new BusinessListDataAdapter(this, …
7
votes
1 answer

Infinite scroll with AngularJs and Firebase

How do you implement infinite scroll on data that you get from firebase. So far I found an angularjs directive, that works really great but I'm having difficulty implementing it with fireable as firebase returns all data in one single request and…
NSCoder
  • 1,388
  • 5
  • 16
  • 38
7
votes
1 answer

Custom infinite scrolling with items being removed while being scrolled out of view

The problem Today's modern websites may use infinite scrolling technique to replace paged lists to make a more seamless experience to their users. This is all nice and dandy as long as users don't scroll to far down which means that your document…
Robert Koritnik
  • 97,460
  • 50
  • 267
  • 388
7
votes
2 answers

simulate infinite scrolling in c# to get full html of a page

There are lots of sites that use this (imo) annoying "infinite scrolling" style. Examples of this are sites like tumblr, twitter, 9gag, etc.. I recently tried to scrape some pics off of these sites programatically with HtmlAgilityPack. like…
Thousand
  • 6,242
  • 2
  • 32
  • 46
7
votes
4 answers

CasperJS can not trigger twitter infinite scroll

I am trying to get some information from twitter using CasperJS. And I'm stuck with infinite scroll. The thing is that even using jquery to scroll the page down nothings seems to work. Neither scrolling, neither triggering the exact event on window…
finder_sl
  • 307
  • 4
  • 13
7
votes
3 answers

Modify WordPress Jetpack Plugin To Use 'Class' Instead Of An 'ID' Attribute

What I am trying to achive: Enable seamless & simultaneous infinite scrolling for multiple columns on the same page, each of which is pulling in a different set of content i.e. one column shows the latest posts, while the other shows the latest…
its_me
  • 10,289
  • 23
  • 78
  • 126
7
votes
3 answers

jQuery infinite-scroll Not Triggering

I'm making a simple little website to apply a different formatting style to Reddit posts, I'm trying to add the infinite-scroll jQuery plugin but it doesn't do anything. I tried following the (very simple) instructions on the infinite-scroll page…
Joshua Walsh
  • 1,676
  • 5
  • 21
  • 45