Skip to content

Difference b/w fallback:true on getStaticProps and getServerSideProps #17291

Answered by lfades
kvedantmahajan asked this question in Help
Discussion options

You must be logged in to vote

Let's say I have [someDynamicPageSlug].js and I will need to have getStaticPaths to render top 10 slug pages and getStaticProps with fallback:true will serve rest of the pages generating them on demand for first time and then next time it will serve it right out of CDN.

It's always served through a CDN, the fallback page is also a static page.

Now, it is mentioned under getServerSideProps when to use section that in increases the Time to first Byte (TTFB ). My first question is will not fallback:true do the same for first time render of a page which doesn't exists in getStaticPaths and have same TTBF?

No, the fallback will be way faster because it's a static page. Once it loads it wil…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@kotsh23
Comment options

Answer selected by lfades
Comment options

You must be logged in to vote
5 replies
@lfades
Comment options

@kvedantmahajan
Comment options

@lfades
Comment options

@taylorklodowski
Comment options

@lfades
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants