Seo friendly cost effective pagination with firestore

Ramaild M
1 min readDec 16, 2020

Lately, as my news site grow bigger, I’ve been struggling with Seo friendly pagination with firestore query, which maily means firestore jumping page.

First I go to query with offset, end up with huge bill. Cause offset(1000) mean 1000 reads cost for nothing.

After digging into many many dicussions on Github or stackoverflow, I fount that I’t impossilbe. But really , I am just not digging it enough.

I paid for an answer at a website that pay for answer, proved that money is knowledge. Here the article of Seo friendly cost effective pagination with firestore that does not use offset but achieve great flexiblity to paginate , Easy to make everything static with server side render.

That is a smart solution.

Basically a well designed page id system saved my life. It is easy to understand with a simple data structure, how can’t I think of that on my own .

Along with nextjs ssr and incremental static gereation , I successfully turned my pagination into many individual page that can be visited directly.

--

--