From the course: Learning Next.js

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Static rendering vs. dynamic rendering

Static rendering vs. dynamic rendering

From the course: Learning Next.js

Static rendering vs. dynamic rendering

Static rendering is when the data is fetched and rendered at build time. And so the benefits of static rendering are multiple because it allows for a reduced loading time and faster rendering with content that can be cached. Static rendering also provides with great benefits for SEO, for search engine optimization, with pre-rendered content that makes it easier for web crawlers to index pages, which leads to an improved and better search engine ranking. So static rendering is useful when no data is fetched, and a few examples of static rendering is the About page or the Contact page to display the contact information. In this two examples, no data is fetched. Opposite of static rendering, you have dynamic rendering, which happens when content is rendered on the server at request time. It happens after a user request with specific data. One good example of dynamic rendering is when we need to display the list of blog posts here, and also when you click on one single post to display…

Contents