I have a general question on how netlify treats nextjs SSR pages. Perhaps they are obvious and I apologise in advance for my limited understanding. At least next person searching can get these answered quickly. If this is correct, I do not see why I would need SSG for a nextjs app.
Do SSR pages get cached by netlify?
If so how do I determine the max-age of these pages?
Do the pages still get snippet injection?
Do redirects work the same way?
Further, looking around, vercel deployment respects something like this. Would this work with netlify?
hey @mansoor292 ! Thanks for your very clear and concise questions! We had a chance to chat with some of our Next experts today and here is what we determined.
Do SSR pages get cached by netlify?
No, they do not!
If so how do I determine the max-age of these pages?
We don’t cache them, so this isn’t possible in this way.
Do the pages still get snippet injection?
No, they don’t in this case.
Do redirects work the same way?
Yes, they absolutely do! as long as it is Netlify redirects you are referring to, not nextjs redirects.
Further, looking around, vercel deployment respects something like this. Would this work with netlify?
We’re actually still looking into this, and can let you know once we have more information to share, if this is helpful for you.