Next.js 9.5
nextjs.org
Next.js 9.5
1–10 of 40 posts
Re: Next.js 9.5
#2Re: Next.js 9.5
#3Curious, anyone know how this would compare performance wise for something like Reddit verses livewire/liveview. I know those would be more reactive, but I like the idea of static pages that are dynamic as well.
Re: Next.js 9.5
#4For instance, I have a project where the front page gets server-side-rendered for logged out users. We can't do client-side-rendering because we care about SEO. And we can't do static-generation at build time because the content of the front page regularly changes (it summarizes activities of other users).
But with incremental static site generation... even if we care about the community always having up-to-date data on that front page, we could presumably set the timeout to like five seconds. That's a heck of a savings compared to generating it on every request.
Re: Next.js 9.5
#5Incremental Static Site Regeneration is really compelling, I wonder what the gotchas are. For instance, I have a project where the front page gets server-side-rendered for logged out users. We can't do client-side-rendering because we care about SEO. And we can't do static-generation at build time because the content of the front page regularly changes (it summarizes activities of other users). But with incremental s…
Or does it have more do do with properties generally associated with SPAs like large bundle sizes or slow time to first interaction?
I'm mainly wondering if you can build a SEO-friendly SPA marketing page today using techniques like dynamic imports and code splitting to lazy load just the scripts and content needed for the initial render instead of going all the way to static generation or server side rendering.
Re: Next.js 9.5
#6Incremental Static Site Regeneration is really compelling, I wonder what the gotchas are. For instance, I have a project where the front page gets server-side-rendered for logged out users. We can't do client-side-rendering because we care about SEO. And we can't do static-generation at build time because the content of the front page regularly changes (it summarizes activities of other users). But with incremental s…
Back in the day, in Django/Drupal/any CMS, for anonymous users, you'd just dump each page into memcached with a path URL.
Then when a new anonymous visitor comes, you load it right up from – extremely fast – memory. Maybe even faster than loading from the file system? Nginx can actually ask memcached directly, even bypassing the app server.
It feels like we've gone full circle.
Re: Next.js 9.5
#7Incremental Static Site Regeneration is really compelling, I wonder what the gotchas are. For instance, I have a project where the front page gets server-side-rendered for logged out users. We can't do client-side-rendering because we care about SEO. And we can't do static-generation at build time because the content of the front page regularly changes (it summarizes activities of other users). But with incremental s…
Re: Next.js 9.5
#8Incremental Static Site Regeneration is really compelling, I wonder what the gotchas are. For instance, I have a project where the front page gets server-side-rendered for logged out users. We can't do client-side-rendering because we care about SEO. And we can't do static-generation at build time because the content of the front page regularly changes (it summarizes activities of other users). But with incremental s…
Maybe I'm missing something, but ultimately, isn't this just a re-invention of a site-wide cache? Back in the day, in Django/Drupal/any CMS, for anonymous users, you'd just dump each page into memcached with a path URL. Then when a new anonymous visitor comes, you load it right up from – extremely fast – memory. Maybe even faster than loading from the file system? Nginx can actually ask memcached directly, even bypas…
Re: Next.js 9.5
#9Incremental Static Site Regeneration is really compelling, I wonder what the gotchas are. For instance, I have a project where the front page gets server-side-rendered for logged out users. We can't do client-side-rendering because we care about SEO. And we can't do static-generation at build time because the content of the front page regularly changes (it summarizes activities of other users). But with incremental s…
Maybe I'm missing something, but ultimately, isn't this just a re-invention of a site-wide cache? Back in the day, in Django/Drupal/any CMS, for anonymous users, you'd just dump each page into memcached with a path URL. Then when a new anonymous visitor comes, you load it right up from – extremely fast – memory. Maybe even faster than loading from the file system? Nginx can actually ask memcached directly, even bypas…
I've worked with similar systems to the one you've laid out -- tell me you've never had to jump into the cache to clear it because a client wasn't seeing their updates. Or a page was getting improperly cached. Even if it was simple and effective, it was often a pain.
These days, there are a number of services that will store your html and other static files on their edge CDN servers (cloudflare workers, vercel, netlify, among others) leading to your users downloading the files at remarkably fast speeds. You can reach a pretty amazing TTI while maintaining nigh infinite scalability.
I will say that while I personally use next.js, I stick entirely with server-side rendering. I find it to be a better all-around user-experience for my use-case with several distinct advantages. But I only serve ~150,000 users a month, who are all relatively close to my server and I don't have much static content. A modest ec2 instance handles it with ease.
But if I was building an application that targeted many regions and needed infinite scalability, or one that heavily utilized static data, I'd definitely consider pursuing the approach laid out above.
We've gone 'full circle', sure. Because React offered a way to write web applications in a much more consistent, interactive way than anything before it. But we spent a few years growing our bundle sizes out of control, and improperly structuring our applications which led to TTI growing and everything being slow and clunky. Companies that cared and had good engineering were able to navigate these problems, but your average developer couldn't. Now with a system like this, they can not only match the performance of classic applications, but in many cases exceed it.