| Description (long) |
Show detailsckanext-portaljs-improvements
This extension has one my purpose, to allow the use of On demand Incremental Static Regeneration(On demand ISR) on Portal.JS websites.
NextJS has three ways of fetching data, client fetching, ServerSideRendering and StaticSite Generation(SSG).
- Client fetching allows us to send the skeleton of the page quickly, and then populate it with information using javascript, that has a lot of problems, the SEO get considerably affected, because the google crawlers can’t index the pages easly, there is also the problem of layout shifting, and also the browsers can’t cache the pages easly
- Serverside rendering, has the advantages of SEO, no layout shifting and a easier time for caching, the problem is that we need to wait for all tha data to be fetched to show something on the screen to the user, depending on the page that could mean a lot of time
- StaticSite Generation is a little bit different, we build the pages ahead of time, fetch all the data, inject that data into the html, and once the user requests it we just send everything already filled, this makes the page loads super fast and already with all the information needed, the SEO is great, the caching is great, there is no layout shift and perhaps most important, this allows us to use the
<Link> tag to its fullest potential, when you have a static page that is linked using a <Link> tag, Next prefetches the html, for instance, if you have a list of 5 dataset pages, as soon the page loads, Next will use the iddle time to fetch everyone of those 5 pages on the background, this basically means app like speed when changing from one page to the next.
But if StaticSite Generation is so awesome, why do we use the other two tactics most of the time? Thats because in SSG the pages are only built once when the project is deploy the project, so if someone changes an information after the deploy the only way to update that is by redeploying everything. There is a way in Next to schedule re
|