jargon

Comparison

Infinite scrollvsIntersectionObserver

Infinite scroll

you watch a sentinel element near the bottom and fetch the next page when it comes into view.

Loading additional pages as the user approaches the end of the list, usually with an IntersectionObserver on a trailing element. It removes a click but breaks things users rely on: the footer becomes unreachable, the back button loses position, and there is no way to say where you are in the list. Offering an explicit load-more control alongside it is the usual compromise.

Full entry →

IntersectionObserver

you found out when the element scrolled into view without running any code on scroll.

An API that reports asynchronously when an element enters or leaves a viewport or ancestor, off the main thread's scroll path. It replaced the pattern of measuring positions in a scroll handler, which caused forced layout on every frame. Its callback is throttled and batched, so it is for triggering work rather than for driving a scroll-linked animation.

Full entry →

Related comparisons