Incremental 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 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.
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 bypassing the app server.
I haven't really kept up to date in this area so would love to hear some experts weigh in here: Do search engines (or really just Google) still penalize sites that are pure SPAs on that fact alone?
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.
I don't know what archetecture your website uses, but our site for example we just cache the view into redis for however long. It's built into a lot of webframeworks, but shouldn't be too crazy to implement by hand.
Developing a Next.js app is a really nice experience. I admit when it first came out I didn't pay that much attention to it because I thought how it did routing was weird and I don't think the server was as extensible. Fast forward to 9.5 and there's pretty much no real reason for me to build a custom Webpack-based setup for my next project.
It's interesting that the React Router team, which is building the competing Remix framework (similar to Next but based on React Router) is arguing that instead of supporting static page generation, they will just urge their users to use CDNs with aggressive caching rules.
Still, good to have options. It will be interesting to see how Remix is received once it launches. Next is currently peerless for DX-friendly React frameworks.
Any rebranding will have backlash. It solved the issue of ZEIT Now being one _product_ whereas Vercel is the _platform_. It also brought a new focus on Jamstack and front-end developers.
I'll admit I'm biased though, as I'm a Vercel customer.
Curious, 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.
i love vercel and use it for all my projects, right up until i need to add auth/api, at which point I switch off of it immediately for security reasons because there are no static IPs unless you're an "enterprise" customer
it's unclear why they're rolling out performance features while this critical security hole persists. no doubt i'll get flamed for it, but, it's a really bad idea to use dynamic IPs to connect to your database with only a password...
oh yeah, I remember running into that problem when I was using a database on Digital Ocean and wanted to add vercel api routes as a trusted source. I had also switched off of it because of that. However, I had a look at their blog the other day and apparently they have an Anycast IP range now, which probably solves this issue https://vercel.com/blog/new-edge-dev-infrastructure#vercel's.... I haven't tried it yet though
[+] [-] tunesmith|5 years ago|reply
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 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.
[+] [-] silviogutierrez|5 years ago|reply
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.
[+] [-] ss3000|5 years ago|reply
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.
[+] [-] penagwin|5 years ago|reply
[+] [-] dbbk|5 years ago|reply
[+] [-] ianwalter|5 years ago|reply
[+] [-] azangru|5 years ago|reply
[+] [-] leerob|5 years ago|reply
[+] [-] dbbk|5 years ago|reply
Still, good to have options. It will be interesting to see how Remix is received once it launches. Next is currently peerless for DX-friendly React frameworks.
[+] [-] huangbong|5 years ago|reply
[+] [-] leerob|5 years ago|reply
Any rebranding will have backlash. It solved the issue of ZEIT Now being one _product_ whereas Vercel is the _platform_. It also brought a new focus on Jamstack and front-end developers.
I'll admit I'm biased though, as I'm a Vercel customer.
[+] [-] gremlinsinc|5 years ago|reply
[+] [-] leerob|5 years ago|reply
https://static-tweet.now.sh/
[+] [-] unknown|5 years ago|reply
[deleted]
[+] [-] droptablemain|5 years ago|reply
[+] [-] unknown|5 years ago|reply
[deleted]
[+] [-] dmitryminkovsky|5 years ago|reply
[+] [-] bionhoward|5 years ago|reply
it's unclear why they're rolling out performance features while this critical security hole persists. no doubt i'll get flamed for it, but, it's a really bad idea to use dynamic IPs to connect to your database with only a password...
[+] [-] luisrudge|5 years ago|reply
[+] [-] maxast|5 years ago|reply
[+] [-] djstein|5 years ago|reply