N
Nuxt17mo ago
tierra

ISR Deployment Netlify (with Sanity)

Hey, until today it is not really clear to me how to properly deploy ISR on e.g. Netlify. I am currently using Sanity as a backend and in my /pages files I am fetching files as such
const { data, refresh } = useSanityQuery(query, {
slug: route?.params?.slug || "",
});
const { data, refresh } = useSanityQuery(query, {
slug: route?.params?.slug || "",
});
My nuxt config looks like this:
routeRules: {
"/": { isr: true },
"/**": { isr: true },
},
routeRules: {
"/": { isr: true },
"/**": { isr: true },
},
But when I deploy this page, I can see that there are still network fetches on every route... Can someone explain to me what I am not understanding / doing wrong?
4 Replies
warflash
warflash17mo ago
Client side Navigation isn't Server Cached If you refresh the page using f5 it should give you a Cached response after the first try
manniL
manniL17mo ago
(As a note, to "avoid" that, you can use the BFF pattern with your backend routes and cache them too)
tierra
tierraOP17mo ago
I do not quite understand why that is liek this though. I thought the benefit of ISR would be a fast browsing experience, but then it is basically the same speed as SSR ?
manniL
manniL17mo ago
not for the initial request, no
Want results from more Discord servers?
Add your server