3 ms·
Yes this only works when you use JS to implement anything dynamic, user specific, requiring up to date (up to the second) data and so on. You can keep the stati
by quickthrower2 4y ago
Yes this only works when you use JS to implement anything dynamic, user specific, requiring up to date (up to the second) data and so on. You can keep the static content fairly up to date.
For HN for example, you could prerender much of the content including latest
comments and get Next to keep it up to date, cache invalidating as necessary. Basically have it rebuild static pages as posts are made. Then use fetch calls or maybe sockets to get the very latest posts and keep it up to date, even live updates if you wish.
ISR is the jargon here: https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration https://nextjs.org/docs/basic-features/data-fetching/increme...
It is a bit like a mirror of what HN does. HN will use caching so that if you are logged out you get fast renders of pages. Instead of caching, you are pregenerating and keeping it up to date.
- udkl 4y agoThanks, this was useful.