New: search page at /blog/search, JSON feed at /feed.json, and machine-readable search at /blog/search.json.
Back to blog
Engineering 1 minute read

Infinite Scroll With IntersectionObserver (Without Jank)

February 5, 2026

Infinite Scroll With IntersectionObserver (Without Jank)

AI SUMMARY

Render the first page on the server for SEO, then append pages on the client using an `IntersectionObserver` watching a sentinel div. The endpoint should accept `offset`, `limit`, and `category`, and it should exclude the hero post to avoid duplicates.

Alex Kim
Alex Kim
Product Engineer
View author page

Share this article

On this page

Our blog index loads more cards as you scroll. There’s no “Load more” button.

The shape of the API

We keep it simple:

GET /blog/posts.json?offset=8&limit=8&category=engineering

The sentinel pattern

const io = new IntersectionObserver(([entry]) => {
  if (entry.isIntersecting) loadMore();
});

io.observe(sentinel);

Optional: virtualization

If you ever have thousands of posts, add virtualization. Until then, pagination is enough.

More from this author

Alex Kim

Author page

More posts to read