Difference b/w fallback:true on getStaticProps and getServerSideProps #17291
-
Reading the documentation on Data Fetching, I am not clear for what is the difference apart from CDN caching if I choose Here is my understanding -: Let's say I have Now, it is mentioned under I'm asking because, I'm evaluating if I can simply use Second question is that is there any SEO impact in picking one strategy over the other. The way docs are put up there doesn't seems to be but if someone has worked on the scale of million metrics and have seen any difference please let me know. I will appreciate to sufficiently deep these about it. How they work internally (if possible) as reading the docs, gives a black box to people like me for inner workings of it. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
It's always served through a CDN, the fallback page is also a static page.
No, the fallback will be way faster because it's a static page. Once it loads it will start fetching the data in the browser and populate it after that. The fallback page is like a loading state. With
If you need SEO but also want to have static pages, consider using |
Beta Was this translation helpful? Give feedback.
-
So, here is my understanding. Time to first byte is faster because we are showing something because of fallback property. And then when a page is finished compiling in the background on server, it caches it on CDN and then ships it down to browser and for that reason I am always getting it via CDN. Right? Basically, it is like client side rendering for fallback component and the hydration happens for the actual page later. Now, let us understand the impact of SEO since you mentioned |
Beta Was this translation helpful? Give feedback.
It's always served through a CDN, the fallback page is also a static page.
No, the fallback will be way faster because it's a static page. Once it loads it wil…